You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importrequestsdefget_echo_websocket_response(cookie_string):
url='https://echo.websocket.org/.ws'headers= {
'priority': 'u=0, i',
'upgrade-insecure-requests': '1',
'Cookie': cookie_string
}
response=requests.get(url, headers=headers)
# Since there are no variables to parse, return an empty dictionaryreturn {}
cookie_string='key1=value1;key2=value2'# Convert cookie_string to a dict to retrieve valuescookies_dict=dict(item.split('=') foritemincookie_string.split(';'))
# Retrieve values from cookies_dict if neededvalue1=cookies_dict.get('key1')
value2=cookies_dict.get('key2')
# Call the functionresult=get_echo_websocket_response(cookie_string)
print(result)
The text was updated successfully, but these errors were encountered:
Seems like Websockets are ignored in HAR?
Steps to reproduce
Run
create_har.py
and navigate to https://echo.websocket.org/.wsAnalysis looks like the following
Incorrectly generated code
The text was updated successfully, but these errors were encountered: