python 发送HTTP请求 post json 格式

    xiaoxiao2021-04-01  57

    import httplib import json test_data = {'pictureName':'1.jpg'} requrl = "http://10.1.24.88:8090/api/load_pic" headerdata = {"Content-type": "application/json"} conn = httplib.HTTPConnection("10.1.24.88",8090) conn.request('POST',requrl,json.dumps(test_data),headerdata) response = conn.getresponse() res= response.read() print res
    转载请注明原文地址: https://ju.6miu.com/read-665528.html

    最新回复(0)