To add a header to a REST request using RestSharp in C#, use the AddHeader method of the RestRequest object, passing the header key and value as parameters:
main.cs277 chars11 lines
In the above example, a POST request is being created and an "Authorization" header is added to it. Replace "YourAccessTokenHere" with your actual access token.
Note that you'll need to create a RestClient object and define the URL you want to send the request to before executing the request.
gistlibby LogSnag