我要用vc写一个程序,发送post数据包到java的一个servlet上,但是有很多的参数,还有大量的数据,我应改怎么写post包?我不懂post的数据格式,那位大哥给个参考?
比如url为http://localhost/servlet/covnert?isalive=1&data=(这里为大量的数据);我的数据包应该怎么写?
POST http://localhost/servlet/covnert HTTP1.1
content-type: ???
isalive=1
data=数据
这么写对吗?
救急啊!
比如url为http://localhost/servlet/covnert?isalive=1&data=(这里为大量的数据);我的数据包应该怎么写?
POST http://localhost/servlet/covnert HTTP1.1
content-type: ???
isalive=1
data=数据
这么写对吗?
救急啊!
POST /examples/servlet/ConversionServlet HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0
Content-Length: 30
Host: LOCALHOST
Content-Type: application/x-www-form-urlencodedfilename=123.txt&format=txt
暂时成功,正在把它写成代码,谢谢大家帮助!
我还是不是很清楚post数据包的格式,看了一下http1.1协议也没懂,
那位知道希望可以和我交流
msn : [email protected]
里面不能加数据,我把filename=123.txt&format=txt改成
filename=123.txt&format=txt&data=数据(4k的数据)
就失败了,怎么办啊?