mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-23 00:32:50 +08:00
removed default headers
This commit is contained in:
parent
9bb86122f8
commit
ffd4e364f6
@ -12,8 +12,6 @@ namespace Ocelot.Requester
|
||||
internal class HttpClientBuilder : IHttpClientBuilder
|
||||
{
|
||||
private readonly Dictionary<int, Func<DelegatingHandler>> _handlers = new Dictionary<int, Func<DelegatingHandler>>();
|
||||
private Dictionary<string, string> _defaultHeaders;
|
||||
|
||||
|
||||
public IHttpClientBuilder WithQos(IQoSProvider qosProvider, IOcelotLogger logger)
|
||||
{
|
||||
@ -28,16 +26,6 @@ namespace Ocelot.Requester
|
||||
|
||||
var client = new HttpClient(CreateHttpMessageHandler(httpclientHandler));
|
||||
|
||||
if (_defaultHeaders == null)
|
||||
{
|
||||
return new HttpClientWrapper(client);
|
||||
}
|
||||
|
||||
foreach (var header in _defaultHeaders)
|
||||
{
|
||||
client.DefaultRequestHeaders.Add(header.Key, header.Value);
|
||||
}
|
||||
|
||||
return new HttpClientWrapper(client);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user