
1 mengzhuo 2013 年 5 月 20 日 确实得很 json模块不行吗? |
2 Jet 2013 年 5 月 20 日 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 2013 年 5 月 20 日 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 2013 年 5 月 20 日 |
5 mmnsghgn 2017 年 7 月 15 日 推荐一个网站: https://curl.trillworks.com/ |