Request

zio.http.Request
See theRequest companion object
final case class Request(method: Method, url: URL, headers: Headers, body: Body, version: Version)

Immutable HTTP request consisting of method, URL, headers, body, and protocol version.

Convenience accessors path and queryParams delegate to the url field.

Attributes

Companion
object
Source
Request.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Attributes

Source
Request.scala
def addHeader(name: String, value: String): Request

Attributes

Source
Request.scala
def addHeader(header: Header): Request

Attributes

Source
Request.scala
def addHeaders(other: Headers): Request

Attributes

Source
Request.scala
def body(body: Body): Request

Returns a copy with the supplied body and a synchronized Content-Type header.

Returns a copy with the supplied body and a synchronized Content-Type header.

This overwrites any existing Content-Type header with body.contentType.render so the headers remain aligned with the body.

Attributes

Source
Request.scala
def contentType: Option[ContentType]

Returns this request's content type.

Returns this request's content type.

The typed Content-Type header is preferred when present and parseable. If the header is absent or cannot be parsed as a typed Content-Type header, this method falls back to the body's content type.

Attributes

Source
Request.scala

Attributes

Source
Request.scala
def header[A](headerCodec: Codec[A]): Option[A]

Decodes the first request header matching the supplied codec.

Decodes the first request header matching the supplied codec.

Attributes

Source
Request.scala
def method(method: Method): Request

Attributes

Source
Request.scala
def path: Path

Attributes

Source
Request.scala
def path(path: Path): Request

Returns a copy with the URL path replaced, preserving the other URL parts.

Returns a copy with the URL path replaced, preserving the other URL parts.

Attributes

Source
Request.scala

Attributes

Source
Request.scala
def removeHeader(name: String): Request

Attributes

Source
Request.scala
def setHeader(name: String, value: String): Request

Attributes

Source
Request.scala
def setHeader(header: Header): Request

Attributes

Source
Request.scala

Attributes

Source
Request.scala
def updateUrl(f: URL => URL): Request

Attributes

Source
Request.scala
def url(url: URL): Request

Attributes

Source
Request.scala
def version(version: Version): Request

Attributes

Source
Request.scala

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala