Force HTTP/1.1 for POSTs to work around High Sierra HttpClient issue.

This commit is contained in:
Chris Ross (ASP.NET) 2018-03-13 10:14:12 -07:00
parent e8f798fb5a
commit 4b5bd5a066
1 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,12 @@ namespace E2ETests
private async Task<HttpResponseMessage> DoPostAsync(Uri uri, HttpContent content)
{
_logger.LogInformation("POST {0}", uri.ToString());
var resp = await _httpClient.PostAsync(uri, content);
var request = new HttpRequestMessage(HttpMethod.Post, uri)
{
Content = content,
Version = new Version(1, 1),
};
var resp = await _httpClient.SendAsync(request);
LogHeaders(resp, LogLevel.Information);
return resp;
}