- 论坛徽章:
- 0
|
post一个有参数的内容
比如说。我要向 http://localhost/save.jsp POST name=123456
我写的发送字符串如下:
char buf2[]="POST /save.jsp HTTP/1.1\r\n\
Accept: */*\r\n\
Accept-Language: zh-cn\r\n\
Accept-Encoding: gzip, deflate \r\n\
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)\r\n\
Host:localhost:8080\r\n\
Content-Length: 82\r\n\
Connection: Keep-Alive\r\n\
Cache-Control: no-cache\r\n\
Cookie: \r\n\
\r\n\
name=123456&Age=22";
一直提示(我本机用的tomcat服务器)
HTTP/1.1 505 HTTP Version Not Supported
Server: Apache-Coyote/1.1
Date: Wed, 29 Oct 2008 14:51:40 GMT
Connection: close
我用get方法就没事,请高手帮忙看看哪出问题了
[ 本帖最后由 whs8316 于 2008-10-30 11:49 编辑 ] |
|