Class WebSocketRequest
java.lang.Object
org.apache.pekko.http.javadsl.model.ws.WebSocketRequest
Represents a WebSocket request. Use
WebSocketRequest.create to create a request
for a target URI and then use addHeader or requestSubprotocol to set optional
details.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract WebSocketRequestaddHeader(HttpHeader header) Return a copy of this request that contains the given additional header.abstract WebSocketRequestasScala()static WebSocketRequestCreates a WebSocketRequest to a target URI.static WebSocketRequestCreates a WebSocketRequest to a target URI.abstract WebSocketRequestrequestSubprotocol(String subprotocol) Return a copy of this request that will require that the server uses the given WebSocket subprotocol.static WebSocketRequestwrap(WebSocketRequest scalaRequest) Wraps a Scala version of WebSocketRequest.
-
Constructor Details
-
WebSocketRequest
public WebSocketRequest()
-
-
Method Details
-
create
Creates a WebSocketRequest to a target URI. Use the methods onWebSocketRequestto specify further details.- Parameters:
uri- (undocumented)- Returns:
- (undocumented)
-
create
Creates a WebSocketRequest to a target URI. Use the methods onWebSocketRequestto specify further details.- Parameters:
uriString- (undocumented)- Returns:
- (undocumented)
-
wrap
Wraps a Scala version of WebSocketRequest.- Parameters:
scalaRequest- (undocumented)- Returns:
- (undocumented)
-
addHeader
Return a copy of this request that contains the given additional header.- Parameters:
header- (undocumented)- Returns:
- (undocumented)
-
requestSubprotocol
Return a copy of this request that will require that the server uses the given WebSocket subprotocol.- Parameters:
subprotocol- (undocumented)- Returns:
- (undocumented)
-
asScala
-