/Web/wasHTTPClient.cs |
@@ -65,11 +65,10 @@ |
} |
// Add some standard headers: |
// Accept - for socially acceptable security of mod_sec |
// Accept-Encoding - since we want to use compression if possible |
switch (headers != null) |
{ |
case false: |
headers = new Dictionary<string, string> {{"Accept", @"*/*"}, {"Accept-Encoding", "gzip,defalate"}}; |
headers = new Dictionary<string, string> {{"Accept", @"*/*"}}; |
break; |
default: |
if (!headers.ContainsKey("Accept")) |
@@ -76,10 +75,6 @@ |
{ |
headers.Add("Accept", @"*/*"); |
} |
if (!headers.ContainsKey("Accept-Encoding")) |
{ |
headers.Add("Accept-Encoding", "gzip,deflate"); |
} |
break; |
} |
foreach (var header in headers) |
@@ -119,15 +114,10 @@ |
} |
// Add some standard headers: |
// Accept - for socially acceptable security of mod_sec |
// Accept-Encoding - since we want to use compression if possible |
if (!headers.ContainsKey("Accept")) |
{ |
headers.Add("Accept", @"*/*"); |
} |
if (!headers.ContainsKey("Accept-Encoding")) |
{ |
headers.Add("Accept-Encoding", "gzip,deflate"); |
} |
using (var response = await HTTPClient.SendAsync(request)) |
{ |
return response.IsSuccessStatusCode |
@@ -173,15 +163,10 @@ |
} |
// Add some standard headers: |
// Accept - for socially acceptable security of mod_sec |
// Accept-Encoding - since we want to use compression if possible |
if (!headers.ContainsKey("Accept")) |
{ |
headers.Add("Accept", @"*/*"); |
} |
if (!headers.ContainsKey("Accept-Encoding")) |
{ |
headers.Add("Accept-Encoding", "gzip,deflate"); |
} |
using (var response = await HTTPClient.SendAsync(request)) |
{ |
return response.IsSuccessStatusCode |