gobwas / ws

Tiny WebSocket library for Go.
MIT License
6.1k stars 373 forks source link

Question - add headers during the upgrade #185

Closed kvasilye closed 1 year ago

kvasilye commented 1 year ago

Hello,

Is there a way to add headers during the upgrade?

I need to be able to write an "etag" header so it's seen by the client as soon as the websocket connection is established.

Alternatively, it would work to set an extension header.

cristaloleg commented 1 year ago

Hi, looks like you're interested in Header field in https://pkg.go.dev/github.com/gobwas/ws#Dialer

kvasilye commented 1 year ago

Thank you, that worked.