#python3.10.2
import http.client
import urllib.parse
import json
hostname = "api.ihuyi.com"
request_uri = "/empty-number/submit"
#定義請求的數(shù)據(jù)
values = {
'mobiles':["135xxxxxxxx","136xxxxxxxx"], #手機(jī)號(hào)數(shù)組(最多10個(gè))
}
#將數(shù)據(jù)進(jìn)行編碼
params = json.dumps(values).encode(encoding='UTF8')
#定義請求的頭部
headers = {
"Content-type": "application/json",
"Date": "Tue, 26 Aug 2025 07:14:23 GMT",
"Authorization": "Signature xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Accept": "text/plain"
}
#初始化一個(gè) http 鏈接
conn = http.client.HTTPConnection(hostname)
conn.request("POST", request_uri, params, headers)
response = conn.getresponse()
#打印狀態(tài)
print(response.status, response.reason)
#打印結(jié)果
print(response.read().decode("utf-8"))
conn.close()
國內(nèi)專業(yè)互聯(lián)網(wǎng)團(tuán)隊(duì)
21年行業(yè)經(jīng)驗(yàn)
7x24小時(shí)售后支持
豐富的行業(yè)經(jīng)驗(yàn)
互 億 無 線 官 方 微 信 號(hào)
Copyright ? 2004-2025 上海思銳信息技術(shù)有限公司 All rights reserved. 滬ICP備07035915號(hào)-15 電信增值業(yè)務(wù)許可證:B2-20160082
服務(wù)熱線:
4008 808 898
服務(wù)熱線(工作時(shí)間):
4008 808 898
業(yè)務(wù)咨詢(非工作時(shí)間):
售后咨詢(非工作時(shí)間):