Skip to content

Commit

Permalink
SUPPORT-8272 fix query string when contains more params
Browse files Browse the repository at this point in the history
  • Loading branch information
kudj committed Oct 23, 2024
1 parent 062a868 commit d2bb1af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python-sync-actions/src/http_generic/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,10 @@ def __call__(self, r):
r.headers[self.key] = f"{self.token}"

elif self.position == 'query':
r.url = f"{r.url}?{urlencode({self.key: self.token})}"
if '?' in r.url:
r.url = f"{r.url}&{urlencode({self.key: self.token})}"
else:
r.url = f"{r.url}?{urlencode({self.key: self.token})}"
else:
raise AuthBuilderError(f"Unsupported position {self.position} for API Key auth method")
return r
Expand Down

0 comments on commit d2bb1af

Please sign in to comment.