CartoDB / carto-python

CARTO Python client
https://carto.com
BSD 3-Clause "New" or "Revised" License
154 stars 62 forks source link

Relative path passed using join fails in pyrestcli if it has / at the beggining #95

Closed ethervoid closed 5 years ago

ethervoid commented 5 years ago

pyrestcli uses urljoin to merge base_url and the relative_path but if the relative_path has / at the beggining, it overrides the current path in the base url and that's a problem if the base url is like https://carto.com/user/testuser so for example:

base url: https://carto.com/user/testuser send path: /api/v3/endpoint

the url used in the send method is going to be: https://carto.com/api/v3/endpoint removing the /user/carto path which is really important for us

ethervoid commented 5 years ago

@alrocar second :eye: ?