Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #29 from Azure-Samples/tibre/typoFix
Browse files Browse the repository at this point in the history
Fix typo
  • Loading branch information
Tiago Brenck authored Jun 16, 2020
2 parents 5573b45 + 59bb93b commit faec82e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions iwa-console/ProtectedApiCallHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ public async Task CallWebApiAndProcessResultAsync(string webApiUrl, string acces
{
if (!string.IsNullOrEmpty(accessToken))
{
var defaultRequetHeaders = HttpClient.DefaultRequestHeaders;
if (defaultRequetHeaders.Accept == null || !defaultRequetHeaders.Accept.Any(m => m.MediaType == "application/json"))
var defaultRequestHeaders = HttpClient.DefaultRequestHeaders;
if (defaultRequestHeaders.Accept == null || !defaultRequestHeaders.Accept.Any(m => m.MediaType == "application/json"))
{
HttpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
}
defaultRequetHeaders.Authorization = new AuthenticationHeaderValue("bearer", accessToken);
defaultRequestHeaders.Authorization = new AuthenticationHeaderValue("bearer", accessToken);

HttpResponseMessage response = await HttpClient.GetAsync(webApiUrl);
if (response.IsSuccessStatusCode)
Expand Down

0 comments on commit faec82e

Please sign in to comment.