我正在嘗試使用思科Prime API,它似乎在使用Postman時(輸出是一個xml文件)工作。然而,當我嘗試重現相同的Python:Python的request.get只顯示200狀態
request.get(url, verify=False, auth=credentials)
print(response)
我得到的唯一回應是<Response [200]>
(和禁用SSL警告,但是這是不相關)......我用requests.auth.HTTPBasicAuth來生成「crdentials」變量
你期待什麼反應? –
你看過python請求的文檔嗎?你可能想要的是'r = requests.get(...)'和'print(r.text)| –