code cannot handle http proxy
Describe the bug
We are running a proxy service so the base is using http instead of https
path = decoded["next_url"].replace(self.BASE, "")
is causing a bug because it doesn't handle when the base is https. We would get an error like
<urllib3.connection.HTTPConnection object at 0x7ec3ac4389e0>: Failed to resolve \'<proxy address>https\' ([Errno -2] Name or service not known)"))\n'
To Reproduce
Expected behavior Fix it so it handles the case when base is http:
Screenshots
Additional context
Hello, just a heads up I'm looking at this now.
Hi @yiweny, here's a draft PR that likely solves your request. This was a new feature in that base was mostly used for internal testing against development endpoints and we never really thought about people using this as a proxy address. Do you mind checking out https://github.com/polygon-io/client-python/pull/890 and seeing if this makes sense? Sorry for the delay here it took a bit to understand what was actually needed.
Hey @yiweny, this should be fixed now in the v1.15.0 release. I implemented the fix from your https://github.com/yiweny/client-python/commit/055aeb7a1f7db53c91e80decd4628fa2872d9399#diff-78e47ba54099d2a8d6d1ea2d5b86d0ee312951e1ccee021a07855b10b01ec97fR213-R239 version. You'll just need to run pip install -U polygon-api-client to get the latest release.