1
mengzhuo May 20, 2013
确实囧得很
json模块不行吗? |
2
Jet May 20, 2013
import httplib
import json p = { "method" : "test", "params" : [ { "detail" : "Hello_world"} ] } headers = {"Content-type":"application/x-www-form-urlencoded","Accept":"text/plain"} conn = httplib.HTTPConnection("127.0.0.1", 8081) conn.request("POST","", json.dumps(p), headers) 不知道理解是否正确。 |
3
hit9 May 20, 2013
In [1]: import requests
In [2]: data = { ...: 'method': 'test', ...: 'params': [ ...: {'detail':'hello world'} ...: ] ...: } In [3]: requests.post("http://example.com",data=data) Out[3]: <Response [200]> |
4
xyly624 May 20, 2013
|
5
mmnsghgn Jul 15, 2017 推荐一个网站: https://curl.trillworks.com/
|