additionalHeaders(_:)
Set additional HTTP header fields to be sent by the client during the WebSocket handshake.
Declaration
func additionalHeaders(_ headers: [(name: String, value: String)]) -> WebSocketParameters
- headers:
An array of HTTP header field names and values.
Discussion
This can be used for custom protocols and cookies. Multiple headers of the same name are not allowed, and the header will replaced by the most recently set value.