import json
import http.client
connection = http.client.HTTPSConnection('spd.aiopos.cn')
headers = {'Content-type': 'application/json'}
values = {
'acct_pan':'6226011****83678',
'acct_name':'张三',
'cert_type':'01',
'cert_id':'37293019****95',
'phone_num':'1516××××02'
}
json_foo = json.dumps(values)
connection.request('POST', '/authen/verifi?access_token=e2011a', json_foo, headers)
response = connection.getresponse()
print(response.read().decode())
python3 http提交json参数并获取返回值
最新推荐文章于 2024-06-04 23:08:17 发布