0
我試圖生成通過Python請求的HTTP(S)請求,但是我遇到了一個問題:Python的HTTP請求:沒有發現適配器
No connection adapters were found for 'set(['http://www.example.com/target'])'
我試圖做出這樣的連接所以:
url = ['http://www.example.com/target']
headers = {"Content-Type":"application/json"}
ver = False;
message = { bunch of json data }
curl_request(url,message,headers,ver)
隨着curl_request API調用的存在:
# API call to perform curl request and return resulting json status
def curl_request(url,message,headers,ver):
requests.post(url, data=json.dumps(message), verify=ver, headers=headers)
data = response.json()
return data
我不知道使用列表作爲URL的請求 –
這實際上很簡單!謝謝! – Answoquest