httpwebrequest请求顺序

时间:2013-07-15 15:50:34

标签: c# .net http http-headers

我正在使用HttpWebRequest在c#

中发送请求

请求应该是这样的:

POST https://website.com/file HTTP/1.1
Host: api.website.com
User-Agent: useragent
Content-Length: 81
Accept: */*
Accept-Language: en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Accept-Encoding: gzip, deflate
Connection: keep-alive

但它显示如下:

POST https://website.com/file HTTP/1.1
Accept-Encoding: gzip, deflate
Accept-Language: en;q=1, fr;q=0.9, de;q=0.8, ja;q=0.7, nl;q=0.6, it;q=0.5
User-Agent: useragent
Accept: */*
Content-Type: application/x-www-form-urlencoded; charset=utf-8
Host: api.website.com
Content-Length: 97
Connection: Keep-Alive

我试图搜索如何更改httpwebrequest的顺序但找不到任何内容。

0 个答案:

没有答案