ConnectionError: HTTPSConnectionPool(host='remoteapiserver', port=443): Max retries exceeded with url: /api/post (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7feb54060bd0>: Failed to establish a new connection: [Errno 110]Connection timed out',))
код:
import requests
import json
url :"https://remoteapiserver.com/api/post"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
datas = {"foo":"bar"}
r = requests.post(url,data=json.dumps(datas),headers=headers)
скрытый URL и домен
и POST
, и GET
получают одинаковую ошибку.