【发布时间】:2012-01-22 09:05:56
【问题描述】:
当我使用以下代码发出POST 请求时:
string body = "Hello World";
byte[] bytes = Encoding.ASCII.GetBytes(body);
WebRequest request = WebRequest.Create("http://internalurl");
request.Method = "POST";
request.ContentLength = bytes.Length;
我将内容长度设置为POSTed 的字节数。
GET 请求的正确 ContentLength 是什么?
【问题讨论】:
标签: http http-headers httpwebrequest content-length