How to pass custom header information on a Godot4 WebSocketPeer connection?
1 Answer
\$\begingroup\$
\$\endgroup\$
Okay, I have found how to do this:
- Create an instance of
PackedStringArray - Add it to the WS Client using
_set_handshake_headers
Example:
var _connHeader = PackedStringArray(["header-key: header-value"])
_mySocket.set_handshake_headers(_connHeader)