websockets
websockets copied to clipboard
how to use header correctly
`header= {"Host":"small-dream-a36c.root-hero.workers.dev", # "User-Agent":"" }
async with websockets.connect(uri,extra_headers=header) as websocket: ` Host: 127.0.0.1:8765 Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: Ks08GOoLDrwWyVmdxbvJjQ== Sec-WebSocket-Version: 13 Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits Host: small-dream-a36c.root-hero.workers.dev User-Agent: Python/3.8 websockets/10.3
Get two hosts how to get the desired host and completely delete the user agent instead of setting it as empty