Skip to content

Commit f8efa1d

Browse files
authored
Merge pull request dotnet-architecture#232 from matthewDDennis/master
StandardHttpClient setting Authentication Header
2 parents 1fc7529 + 70c4936 commit f8efa1d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/BuildingBlocks/Resilience/Resilience.Http/StandardHttpClient.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ private async Task<HttpResponseMessage> DoPostPutAsync<T>(HttpMethod method, str
4040
throw new ArgumentException("Value must be either post or put.", nameof(method));
4141
}
4242

43-
// a new StringContent must be created for each retry
43+
// a new StringContent must be created for each retry
4444
// as it is disposed after each call
4545

4646
var requestMessage = new HttpRequestMessage(method, uri);
@@ -59,7 +59,7 @@ private async Task<HttpResponseMessage> DoPostPutAsync<T>(HttpMethod method, str
5959

6060
var response = await _client.SendAsync(requestMessage);
6161

62-
// raise exception if HttpResponseCode 500
62+
// raise exception if HttpResponseCode 500
6363
// needed for circuit breaker to track fails
6464

6565
if (response.StatusCode == HttpStatusCode.InternalServerError)
@@ -73,12 +73,12 @@ private async Task<HttpResponseMessage> DoPostPutAsync<T>(HttpMethod method, str
7373

7474
public async Task<HttpResponseMessage> PostAsync<T>(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer")
7575
{
76-
return await DoPostPutAsync(HttpMethod.Post, uri, item, authorizationToken, requestId, authorizationToken);
76+
return await DoPostPutAsync(HttpMethod.Post, uri, item, authorizationToken, requestId, authorizationMethod);
7777
}
7878

7979
public async Task<HttpResponseMessage> PutAsync<T>(string uri, T item, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer")
8080
{
81-
return await DoPostPutAsync(HttpMethod.Put, uri, item, authorizationToken, requestId, authorizationToken);
81+
return await DoPostPutAsync(HttpMethod.Put, uri, item, authorizationToken, requestId, authorizationMethod);
8282
}
8383
public async Task<HttpResponseMessage> DeleteAsync(string uri, string authorizationToken = null, string requestId = null, string authorizationMethod = "Bearer")
8484
{

0 commit comments

Comments
 (0)