I did a search to see if I could find any similar issues prior to filing the bug. It seems like something within the way urllib3 is behaving, in particular, but I'm not sure.
I have an API endpoint where GET is disabled so only POST and OPTIONS are valid methods. It works fine when I interact with it when it's hosted on HTTP but when I host it over HTTPS, the response is a 405. It behaves the same if I'm using either requests.post() or requests.Session().post().
Specifically, here's an example of the request / response cycle:
>>> resp = requests.Session().post(url, headers=self._headers, verify=False)
>>> resp.content
'{"code": 405, "total": null, "version": 1, "errors": [{"message": "Method \'GET\' not allowed."}]'
On an HTTP environment, with the same call (including verify=False), I get the expected response. I've also been able to successfully hit the same URL with the same headers using Postman and cURL without issue on the HTTPS server.
Is this a bug with the library or am I doing something wrong?
I did a search to see if I could find any similar issues prior to filing the bug. It seems like something within the way urllib3 is behaving, in particular, but I'm not sure.
I have an API endpoint where GET is disabled so only POST and OPTIONS are valid methods. It works fine when I interact with it when it's hosted on HTTP but when I host it over HTTPS, the response is a 405. It behaves the same if I'm using either
requests.post()orrequests.Session().post().Specifically, here's an example of the request / response cycle:
On an HTTP environment, with the same call (including
verify=False), I get the expected response. I've also been able to successfully hit the same URL with the same headers using Postman and cURL without issue on the HTTPS server.Is this a bug with the library or am I doing something wrong?