ClientHttpRequest

scamper.http.client.ClientHttpRequest
final class ClientHttpRequest(request: HttpRequest) extends AnyVal

Adds client extensions to HttpRequest.

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any

Members list

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 parameters

handler

response handler

Attributes

See also
Note

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

def setDeflateContentEncoding(bufferSize: Int): HttpRequest

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

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

Value parameters

bufferSize

size in bytes of buffer used to encode message body

Attributes

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 parameters

bufferSize

size in bytes of buffer used to encode message body

Attributes

Returns

new request