<分区>
假设我有 first=John
和 last=Doe
和以下网址:http://<myurl>/<my controller>
对于接收 HTTP Post 的客户端,HTTP 消息( header 和正文)看起来如何?
<分区>
假设我有 first=John
和 last=Doe
和以下网址:http://<myurl>/<my controller>
对于接收 HTTP Post 的客户端,HTTP 消息( header 和正文)看起来如何?
最佳答案
类似下面的内容。您可以使用 firebug 浏览器插件来检查原始 HTTP 通信。您也可以read this article了解更多详情。
POST /mycontroller HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 20
first=John&last=Doe
关于http - http post请求的 header 和正文如何?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16617943/