PoolManager と HTTPSConnectionPool の両方で「POST」リクエストをテストしました。最初のものは機能し、もう1つは私に投げます:
urllib3.exceptions.MaxRetryError:
HTTPSConnectionPool(host='https://some.url.com', port=443):
Max retries exceeded with url: /some-api (Caused by <class 'socket.gaierror'>:
[Errno -2] Name or service not known)
PoolManager のコードは次のとおりです。
import urllib3
HOST = 'https://some.url.com'
PORT = 443
PATH = '/some-api'
xml_request = '<some xml tree/>'
manager = urllib3.PoolManager()
res = manager.request('POST', HOST+PATH, {'req':xml_request})
HTTPSConnectonPool の場合:
manager = urllib3.HTTPSConnectionPool(HOST, port=PORT)
res = manager.request('POST', PATH, {'req':xml_request})