Performs a single request
.
Performs a single request
. Returns one response if client replied.
Note that request may contain stream of bytes that shall be sent to client. The response from server is evaluated _after_ client sent all data, including the body to the server.
Note that the evaluation of body
in HttpResponse may not outlive scope of resulting stream. That means
only correct way to process the result is within the flatMap i.e.
request(thatRequest).flatMap { response =>
response.body.through(bodyProcessor)
}
This methods allows to be supplied with timeout (default is 5s) that the request awaits to be completed before failure.
Timeout is computed once the requests was sent and includes also the time for processing the response header but not the body.
Resulting stream fails with TimeoutException if the timeout is triggered
Request to make to server
Size of the chunk to used when receiving response from server
Request will fail if response header and response body is not received within supplied timeout
Reads SSE encoded stream of data from the server.
Reads SSE encoded stream of data from the server.
Request to server. Note that this must be GET
request.
Max size of expected response header
Max size of the chunk
Establishes websocket connection to the server.
Establishes websocket connection to the server.
Implementation is according to RFC-6455 (https://tools.ietf.org/html/rfc6455).
If this is established successfully, then this consults pipe
to receive/sent any frames
From/To server. Once the connection finishes, this will emit once None.
If the connection was not established correctly (i.e. Authorization failure) this will not consult supplied pipe and instead this will immediately emit response received from the server.
WebSocket request
Pipe that is consulted when WebSocket is established correctly
Max size of Http Response header received
Size of receive buffer to use
Maximum size of single WebSocket frame. If the binary size of single frame is larger than supplied value, WebSocket will fail.