Top Description Methods
org.springframework.web.socket.sockjs.client

public Interface InfoReceiver

Known Direct Subinterfaces
org.springframework.web.socket.sockjs.client.XhrTransport
Imports
java.net.URI, org.springframework.http.HttpHeaders, org.springframework.lang.Nullable

A component that can execute the SockJS "Info" request that needs to be performed before the SockJS session starts in order to check server endpoint capabilities such as whether the endpoint permits use of WebSocket.

Typically XhrTransport implementations are also implementations of this contract.

Author
Rossen Stoyanchev
Since
4.1
See Also
AbstractXhrTransport

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the body of the response
executeInfoRequest
(URI
the URL to obtain SockJS server information from
infoUrl
,
HttpHeaders
the headers to use for the request
headers
)

Perform an HTTP request to the SockJS "Info" URL.

Method Detail

executeInfoRequestback to summary
public String executeInfoRequest(URI infoUrl, HttpHeaders headers)

Perform an HTTP request to the SockJS "Info" URL. and return the resulting JSON response content, or raise an exception.

Note that as of 4.2 this method accepts a headers parameter.

Parameters
infoUrl:URI

the URL to obtain SockJS server information from

headers:HttpHeaders

the headers to use for the request

Returns:String

the body of the response