spring-framework / org.springframework.web.socket.sockjs.client / SockJsClient / setHttpHeaderNames

setHttpHeaderNames

open fun setHttpHeaderNames(@Nullable vararg httpHeaderNames: String): Unit

The names of HTTP headers that should be copied from the handshake headers of each call to SockJsClient#doHandshake(WebSocketHandler, WebSocketHttpHeaders, URI) and also used with other HTTP requests issued as part of that SockJS connection, e.g. the initial info request, XHR send or receive requests.

By default if this property is not set, all handshake headers are also used for other HTTP requests. Set it if you want only a subset of handshake headers (e.g. auth headers) to be used for other HTTP requests.

Parameters

httpHeaderNames - HTTP header names