I've been trying to do a simple authorization requests through python (2.7 and 3.5) e.g.
import requests
requests.get('https://sub-domain.chargify.com/subscriptions.json', auth=('my-authorization-key', 'x'))
and i get the following error
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='sub-domain.chargify.com', port=443): Max retries exceeded with url: /subscriptions.json (Caused by <class 'socket.error'>: [Errno 54] Connection reset by peer)
but if i do a curl call everything works just fine
curl -u my-authorization-key:x https://sub-domain.chargify.com/subscriptions.json
I even tried to go the urllib2 route getting similar responses than requests. Asked a friend to run the requests code for me on his computer and it worked just fine. The only difference was that he was using a newer version of requests so i updated mine to his version didn't work. Went to a server and tried exactly the same steps mentioned above and everything works fine, no errors using requests is only in my mac. I've updated python 2.7 and 3.6 on my machine thinking that maybe that was the cause but still have the same results
any idea on what could it be?