Skip to content

Commit 6c2b03b

Browse files
authored
Remove trailing slash in the api url (unit-finance#116)
The [Unit docs](https://docs.unit.co/) include the trailing slash, so the sdk should handle a base url both with the trailing slash (to be consistent with the docs) and without it (for backwards compatability)
1 parent da7cbee commit 6c2b03b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

unit/api/base_resource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
class BaseResource(object):
88
def __init__(self, api_url, token):
9-
self.api_url = api_url
9+
self.api_url = api_url.rstrip("/")
1010
self.token = token
1111
self.headers = {
1212
"content-type": "application/vnd.api+json",

0 commit comments

Comments
 (0)