Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Library fails to construct correct request URLs on Windows. #30

Open
colleen-love opened this issue Dec 6, 2019 · 1 comment
Open

Comments

@colleen-love
Copy link

colleen-love commented Dec 6, 2019

When making a request on a windows machine, the URL of the request is formatted incorrectly. Here's the request for GET user:

-----------REQUEST-----------
GET https://uat-api.paylution.com/rest/v3/users%5Cusr-00000000-0000-0000-0000-000000000000
User-Agent: Hyperwallet Python SDK v1.3.0
Accept: application/json
Content-Type: application/json
Authorization: Basic {auth}

The request should look like this:

-----------REQUEST-----------
GET https://uat-api.paylution.com/rest/v3/users/usr-00000000-0000-0000-0000-000000000000
User-Agent: Hyperwallet Python SDK v1.3.0
Accept: application/json
Content-Type: application/json
Authorization: Basic {auth}

The culprit is line 117 of api.py

response = self.apiClient.doGet(
    os.path.join('users', userToken)
)

It should look like:

response = self.apiClient.doGet('users/' + userToken)

I would make a PR but this bug happens 54 times and is a part of most requests.

@alimony
Copy link

alimony commented Jul 23, 2020

This was fixed in 81e7b59

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants