ClientHttpRequest

final implicit
class ClientHttpRequest(request: HttpRequest) extends AnyVal

Adds client extensions to HttpRequest.

class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def send[T](handler: ResponseHandler[T])(using client: HttpClient): T

Sends request and passes response to given handler.

Sends request and passes response to given handler.

Value Params
handler

response handler

See also
Note

To make effective use of this method, request.target must be an absolute URI.

Adds deflate to Content-Encoding header and encodes message body.

Adds deflate to Content-Encoding header and encodes message body.

Value Params
bufferSize

size in bytes of buffer used to encode message body

Returns

new request

def setGzipContentEncoding(bufferSize: Int): HttpRequest

Adds gzip to Content-Encoding header and encodes message body.

Adds gzip to Content-Encoding header and encodes message body.

Value Params
bufferSize

size in bytes of buffer used to encode message body

Returns

new request