File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -198,7 +198,8 @@ def post(
198198 log = logging .getLogger ("posthog" )
199199 body = kwargs
200200 body ["sentAt" ] = datetime .now (tz = tzutc ()).isoformat ()
201- url = remove_trailing_slash (normalize_host (host )) + path
201+ trimmed_host = remove_trailing_slash (normalize_host (host ))
202+ url = trimmed_host + path
202203 body ["api_key" ] = api_key
203204 data = json .dumps (body , cls = DatetimeSerializer )
204205 log .debug ("making request: %s to url: %s" , data , url )
@@ -338,7 +339,8 @@ def get(
338339 - not_modified=False and data=response if server returns 200
339340 """
340341 log = logging .getLogger ("posthog" )
341- full_url = remove_trailing_slash (normalize_host (host )) + url
342+ trimmed_host = remove_trailing_slash (normalize_host (host ))
343+ full_url = trimmed_host + url
342344 headers = {"Authorization" : "Bearer %s" % api_key , "User-Agent" : USER_AGENT }
343345
344346 if etag :
You can’t perform that action at this time.
0 commit comments