Skip to content

Commit

Permalink
Merge pull request digium#5 from matt-jordan/requests-fix
Browse files Browse the repository at this point in the history
http_client: Manually construct query parameters for websocket connections
  • Loading branch information
matt-jordan committed Jul 24, 2014
2 parents 7eaba4c + 826582a commit 91eb80f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions swaggerpy/http_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,12 @@ def ws_connect(self, url, params=None):
if k == 'Authorization']
# Pull the URL, which includes query params
url = preped_req.url
# Requests version 2.0.0 (at least) will no longer form a URL for us
# for ws scheme types, so we do it manually
if params:
joined_params = "&".join(["%s=%s" % (k, v)
for (k, v) in params.items()])
url += "?%s" % joined_params
return websocket.create_connection(url, header=header)

def apply_authentication(self, req):
Expand Down

0 comments on commit 91eb80f

Please sign in to comment.