Skip to content

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

@colleen-love

Description

@colleen-love

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions