欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

python3 http提交json參數(shù)并獲取返回值的方法

 更新時(shí)間:2018年12月19日 09:55:23   作者:藥杉  
今天小編就為大家分享一篇python3 http提交json參數(shù)并獲取返回值的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來看看吧

如下所示:

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參數(shù)并獲取返回值的方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評(píng)論