Skip to content

Instantly share code, notes, and snippets.

@osmyn
Created March 6, 2018 21:43
Show Gist options
  • Save osmyn/6b0c150c652afad8775b465ced923c5c to your computer and use it in GitHub Desktop.
Save osmyn/6b0c150c652afad8775b465ced923c5c to your computer and use it in GitHub Desktop.
HttpClient Non-Default Headers
var requestMessage = new HttpRequestMessage(HttpMethod.Get, "https://your.site.com");
requestMessage.Headers.Authorization = new AuthenticationHeaderValue("Bearer", your_token);
httpClient.SendAsync(requestMessage);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment