websockets icon indicating copy to clipboard operation
websockets copied to clipboard

how to use header correctly

Open 8502596 opened this issue 2 years ago • 0 comments

`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

8502596 avatar May 30 '22 01:05 8502596