TA的每日心情 | 开心 2014-12-26 13:34 |
---|
签到天数: 1 天 连续签到: 1 天 [LV.1]测试小兵
|
期望模拟的请求:
- POST /yourURL/ HTTP/1.1
- Content-Type: text/xml
- Content-Length: 443
- Cache-Control: no-cache
- Pragma: no-cache
- Accept: text/html
- Connection: keep-alive
- <?xml version="1.0" encoding="UTF-8"?><content>something</content>
复制代码
尝试:使用web_submit_data,参数非要指定Name和Value。想仅Post一个XmlString过去而已:
- web_submit_data("PostXmlRpc",
- "Action=http://testServier/yourURL/",
- "Method=POST",
- "EncType=multipart/form-data",
- "RecContentType=text/xml",
- ITEMDATA,
- "Name=<?xml version",
- "Value=\"1.0\" encoding=\"UTF-8\"?><content>something</content>",
- ENDITEM,
- LAST);
复制代码
但结果是:
(RelFrameId=1, Internal ID=1)
-----------------------------7d025e2b16b064e\r\n
Content-Disposition: form-data; name="<?xml version"\r\n
\r\n
"1.0" encoding="UTF-8"?><methodCall xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/exten
sions"><methodName>auth.getFrob</methodName><params><param><value><struct><member><name>gu
id</name><value>e6cae838171c4088945e89766751bdcd</value></member><member><name>c</name><va
lue>4B0D097E</value></member><member><name>appkey</name><value>53C927D1A198A7119AA0F337748
4FE81</value></member></struct></value></param></params></methodCall>\r\n
-----------------------------7d025e2b16b064e--\r\n
红色是web_submit_data自动生成而不需要的部分。 |
|