- 以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。
- POST /web/FileService.asmx/DoAction HTTP/1.1
- Host: www.***.com
- Content-Type: application/x-www-form-urlencoded
- Content-Length: length
- proxyId=string&action=string
有网站,如www.***.com上有一个webservice接口,比如DoAction,客户端发送请求之后,返回跟某个ID相关的一些信息,比如文件列表等,客户端发送代码,解析代码如下:
网站支持httppost方法,如上的代码,返回结果实例如下,
- HTTP/1.1 200 OK
- Content-Type: text/xml; charset=utf-8
- Content-Length: length
- <?xml version="1.0" encoding="utf-8"?>
- <string xmlns="http://www.***.com/">string</string>
在客户端(web)上发送代码:
- string service