如何设置Windows.Web.Http.HttpRequestMessage HttpVersion?

时间:2016-08-12 00:40:18

标签: c# .net http uwp

System.Net.Http.HttpRequestMessage具有Version属性,我认为该属性是请求的HTTP版本,但我无法在Windows.Web.Http.HttpRequestMessage中找到相同属性的位置。如果这不是设置HttpRequest版本的正确属性,那是什么?

1 个答案:

答案 0 :(得分:0)

我相信你可以这样做:

HttpBaseProtocolFilter filter = new HttpBaseProtocolFilter(); 
filter.MaxVersion = HttpVersion.Http11;
HttpClient client = new HttpClient(filter);

HttpBaseProtocolFilter.MaxVersion