Packages

final case class Request(version: Version = Version.Default, method: Method = Method.ANY, url: URL = URL.empty, headers: Headers = Headers.empty, body: Body = Body.empty, remoteAddress: Option[InetAddress] = None, remoteCertificate: Option[Certificate] = None) extends HeaderOps[Request] with QueryOps[Request] with Product with Serializable

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Request
  2. Serializable
  3. Product
  4. Equals
  5. QueryOps
  6. QueryChecks
  7. QueryGetters
  8. QueryModifier
  9. HeaderOps
  10. HeaderChecks
  11. HeaderGetters
  12. HeaderModifier
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Request(version: Version = Version.Default, method: Method = Method.ANY, url: URL = URL.empty, headers: Headers = Headers.empty, body: Body = Body.empty, remoteAddress: Option[InetAddress] = None, remoteCertificate: Option[Certificate] = None)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def ++(that: Request): Request

    A right-biased way of combining two requests.

    A right-biased way of combining two requests. Most information will be merged, but in cases where this does not make sense (e.g. two non-empty bodies), the information from the right request will be used.

  4. def ++(that: QueryParams): Request

    Combines two collections of query parameters together.

    Combines two collections of query parameters together. If there are duplicate keys, the values from both sides are preserved, in order from left-to-right.

    Definition Classes
    QueryModifier
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def addCookie(cookie: Cookie.Request): Request
  7. def addCookies(cookie: Cookie.Request, cookies: Cookie.Request*): Request
  8. final def addHeader[T](value: T)(implicit schema: Schema[T]): Request

    Adds headers based on the given value.

    Adds headers based on the given value. The type of the value must have a schema and be a case class and all fields will be added as headers. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. The header names are the field names.

    Definition Classes
    HeaderModifier
  9. final def addHeader[T](name: String, value: T)(implicit schema: Schema[T]): Request

    Adds a header / headers with the specified name and based on the given value.

    Adds a header / headers with the specified name and based on the given value. The value type must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

    Definition Classes
    HeaderModifier
  10. def addHeader(name: CharSequence, value: CharSequence): Request
    Attributes
    protected
    Definition Classes
    HeaderModifier
  11. final def addHeader(header: Header): Request
    Definition Classes
    HeaderModifier
  12. final def addHeaders(headers: Iterable[(CharSequence, CharSequence)]): Request
    Definition Classes
    HeaderModifier
  13. final def addHeaders(headers: Headers): Request
    Definition Classes
    HeaderModifier
  14. def addLeadingSlash: Request
  15. def addQueryParam[T](value: T)(implicit schema: Schema[T]): Request
    Definition Classes
    QueryModifier
  16. def addQueryParam[T](key: String, value: T)(implicit schema: Schema[T]): Request
    Definition Classes
    QueryModifier
  17. def addQueryParam(key: String): Request
    Definition Classes
    QueryModifier
  18. def addQueryParam(key: String, value: String): Request

    Adds the specified key/value pair to the query parameters.

    Adds the specified key/value pair to the query parameters.

    Definition Classes
    QueryModifier
  19. def addQueryParams(queryParams: Iterable[(String, String)]): Request
    Definition Classes
    QueryModifier
  20. def addQueryParams(values: String): Request
    Definition Classes
    QueryModifier
  21. def addQueryParams(key: String, value: Chunk[String]): Request

    Adds the specified key/value pairs to the query parameters.

    Adds the specified key/value pairs to the query parameters.

    Definition Classes
    QueryModifier
  22. def addTrailingSlash: Request

    Add trailing slash to the path.

  23. val allHeaders: Headers

    Custom headers and headers required by the used Body

  24. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  25. val body: Body
  26. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  27. def collect(implicit trace: Trace): ZIO[Any, Nothing, Request]

    Collects the potentially streaming body of the response into a single chunk.

    Collects the potentially streaming body of the response into a single chunk.

    Any errors that occur from the collection of the body will be caught and propagated to the Body

  28. def cookie(name: String): Option[Cookie]

    Returns the cookie with the given name if it exists.

  29. def cookieWithOrFail[R, E, A](name: String)(missingCookieError: E)(f: (Cookie) => ZIO[R, E, A])(implicit trace: Trace): ZIO[R, E, A]

    Uses the cookie with the given name if it exists and runs f with the cookie afterwards.

    Uses the cookie with the given name if it exists and runs f with the cookie afterwards.

    Also, you can set a custom failure value from a missing cookie with E.

  30. def cookieWithZIO[R, A](name: String)(f: (Cookie) => ZIO[R, Throwable, A])(implicit trace: Trace): ZIO[R, Throwable, A]

    Uses the cookie with the given name if it exists and runs f with the cookie afterwards.

  31. def cookies: Chunk[Cookie]

    Returns all cookies from the request.

  32. def dropLeadingSlash: Request
  33. def dropTrailingSlash: Request

    Drops trailing slash from the path.

  34. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  35. def flash[A](flash: Flash[A]): Option[A]

    Returns an A if it exists from the cookie-based flash-scope.

  36. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  37. final def hasContentType(mediaType: MediaType): Boolean
    Definition Classes
    HeaderChecks
  38. final def hasContentType(value: CharSequence): Boolean
    Definition Classes
    HeaderChecks
  39. final def hasFormMultipartContentType: Boolean
    Definition Classes
    HeaderChecks
  40. final def hasFormUrlencodedContentType: Boolean
    Definition Classes
    HeaderChecks
  41. final def hasHeader(header: Header): Boolean
    Definition Classes
    HeaderChecks
  42. final def hasHeader(headerType: HeaderType): Boolean
    Definition Classes
    HeaderChecks
  43. final def hasHeader(name: CharSequence): Boolean
    Definition Classes
    HeaderChecks
  44. final def hasJsonContentType: Boolean
    Definition Classes
    HeaderChecks
  45. def hasQueryParam(name: CharSequence): Boolean
    Definition Classes
    QueryChecks
  46. final def hasTextPlainContentType: Boolean
    Definition Classes
    HeaderChecks
  47. final def hasXhtmlXmlContentType: Boolean
    Definition Classes
    HeaderChecks
  48. final def hasXmlContentType: Boolean
    Definition Classes
    HeaderChecks
  49. final def header[T](implicit schema: Schema[T]): Either[HeaderError, T]

    Retrieves headers as a value of the specified type.

    Retrieves headers as a value of the specified type. The type must have a schema and be a case class and all fields must be headers. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. Headers are selected by field names.

    Definition Classes
    HeaderGetters
  50. final def header[T](name: String)(implicit schema: Schema[T]): Either[HeaderError, T]

    Retrieves the header with the specified name as a value of the specified type.

    Retrieves the header with the specified name as a value of the specified type. The type must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

    Definition Classes
    HeaderGetters
  51. final def header(headerType: HeaderType): Option[HeaderValue]

    Gets a header or returns None if the header was not present or it could not be parsed

    Gets a header or returns None if the header was not present or it could not be parsed

    Definition Classes
    HeaderGetters
  52. final def headerOrElse[T](default: => T)(implicit schema: Schema[T]): T

    Retrieves headers as a value of the specified type T, or returns a default value if the headers are not present or could not be parsed.

    Retrieves headers as a value of the specified type T, or returns a default value if the headers are not present or could not be parsed. The type T must have a schema and be a case class and all fields must be headers. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. Headers are selected by field names.

    Definition Classes
    HeaderGetters
  53. final def headerOrElse[T](name: String, default: => T)(implicit schema: Schema[T]): T

    Retrieves the header with the specified name as a value of the specified type T, or returns a default value if the header is not present or could not be parsed.

    Retrieves the header with the specified name as a value of the specified type T, or returns a default value if the header is not present or could not be parsed. The type T must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

    Definition Classes
    HeaderGetters
  54. final def headerOrFail(headerType: HeaderType): Option[Either[String, HeaderValue]]

    Gets a header.

    Gets a header. If the header is not present, returns None. If the header could not be parsed it returns the parsing error

    Definition Classes
    HeaderGetters
  55. final def headerZIO[T](name: String)(implicit schema: Schema[T]): IO[HeaderError, T]
    Definition Classes
    HeaderGetters
  56. final def headers(headerType: HeaderType): Chunk[HeaderValue]
    Definition Classes
    HeaderGetters
  57. val headers: Headers

    Returns the headers

    Returns the headers

    Definition Classes
    RequestHeaderGetters
  58. def ignoreBody(implicit trace: Trace): ZIO[Any, Nothing, Request]

    Consumes the streaming body fully and then discards it while also ignoring any failures

  59. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  60. val method: Method
  61. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  62. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  63. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  64. def patch(p: Patch): Request
  65. def path(path: Path): Request
  66. def path: Path
  67. def productElementNames: Iterator[String]
    Definition Classes
    Product
  68. def query[T](implicit schema: Schema[T]): Either[QueryParamError, T]

    Retrieves query parameters as a value of the specified type.

    Retrieves query parameters as a value of the specified type. The type must have a schema and be a case class and all fields must be query parameters. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. Query parameters are selected by field names.

    Definition Classes
    QueryGetters
  69. def query[T](key: String)(implicit schema: Schema[T]): Either[QueryParamError, T]

    Retrieves the query parameter with the specified name as a value of the specified type.

    Retrieves the query parameter with the specified name as a value of the specified type. The type must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

    Definition Classes
    QueryGetters
  70. def queryOrElse[T](default: => T)(implicit schema: Schema[T]): T
    Definition Classes
    QueryGetters
  71. def queryOrElse[T](key: String, default: => T)(implicit schema: Schema[T]): T
    Definition Classes
    QueryGetters
  72. def queryParam(key: String): Option[String]

    Retrieves the first query parameter value having the specified name.

    Retrieves the first query parameter value having the specified name.

    Definition Classes
    QueryGetters
  73. def queryParamOrElse(key: String, default: => String): String

    Retrieves the first query parameter value having the specified name, or else uses the default value.

    Retrieves the first query parameter value having the specified name, or else uses the default value.

    Definition Classes
    QueryGetters
  74. def queryParameters: QueryParams
    Definition Classes
    RequestQueryGetters
  75. def queryParams(key: String): Chunk[String]

    Retrieves all query parameter values having the specified name.

    Retrieves all query parameter values having the specified name.

    Definition Classes
    QueryGetters
  76. def queryParamsOrElse(key: String, default: => Iterable[String]): Chunk[String]

    Retrieves all query parameter values having the specified name, or else uses the default iterable.

    Retrieves all query parameter values having the specified name, or else uses the default iterable.

    Definition Classes
    QueryGetters
  77. def queryZIO[T](key: String)(implicit schema: Schema[T]): IO[QueryParamError, T]

    Retrieves all typed query parameter values having the specified name as ZIO

    Retrieves all typed query parameter values having the specified name as ZIO

    Definition Classes
    QueryGetters
  78. final def rawHeader(headerType: HeaderType): Option[String]

    Gets the raw unparsed header value

    Gets the raw unparsed header value

    Definition Classes
    HeaderGetters
  79. final def rawHeader(name: CharSequence): Option[String]

    Gets the raw unparsed header value

    Gets the raw unparsed header value

    Definition Classes
    HeaderGetters
  80. def rawHeaders(name: CharSequence): Chunk[String]
    Definition Classes
    HeaderGetters
  81. val remoteAddress: Option[InetAddress]
  82. val remoteCertificate: Option[Certificate]
  83. final def removeHeader(name: String): Request
    Definition Classes
    HeaderModifier
  84. final def removeHeader(headerType: HeaderType): Request
    Definition Classes
    HeaderModifier
  85. final def removeHeaders(headers: Set[String]): Request
    Definition Classes
    HeaderModifier
  86. def removeQueryParam(key: String): Request

    Removes the specified key from the query parameters.

    Removes the specified key from the query parameters.

    Definition Classes
    QueryModifier
  87. def removeQueryParams(keys: Iterable[String]): Request

    Removes the specified keys from the query parameters.

    Removes the specified keys from the query parameters.

    Definition Classes
    QueryModifier
  88. final def setHeaders(headers: Headers): Request
    Definition Classes
    HeaderModifier
  89. def setQueryParams(queryParams: (String, Chunk[String])*): Request
    Definition Classes
    QueryModifier
  90. def setQueryParams(queryParams: Map[String, Chunk[String]]): Request
    Definition Classes
    QueryModifier
  91. def setQueryParams(values: String): Request
    Definition Classes
    QueryModifier
  92. def setQueryParams(values: QueryParams): Request
    Definition Classes
    QueryModifier
  93. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  94. def unnest(prefix: Path): Request

    Unnests the request by the specified prefix.

    Unnests the request by the specified prefix. If the request URL is not nested at the specified path, then this has no effect on the URL.

  95. def updateBody(f: (Body) => Body): Request

    Returns a request with a body derived from the current body.

  96. def updateBodyZIO[R, E](f: (Body) => ZIO[R, E, Body]): ZIO[R, E, Request]

    Returns a request with a body derived from the current body in an effectful way.

  97. def updateHeaders(update: (Headers) => Headers)(implicit trace: Trace): Request

    Updates the headers using the provided function

    Updates the headers using the provided function

    Definition Classes
    RequestHeaderModifier
  98. def updatePath(f: (Path) => Path): Request
  99. def updateQueryParams(f: (QueryParams) => QueryParams): Request
    Definition Classes
    RequestQueryModifier
  100. def updateURL(f: (URL) => URL): Request
  101. val url: URL
  102. def valueCount(name: CharSequence): Int
    Definition Classes
    QueryChecks
  103. val version: Version
  104. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  105. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  106. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  107. def withBody(body: Body): Request

    Returns a request with the specified body.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  2. def queryParamTo[T](key: String)(implicit codec: TextCodec[T]): Either[QueryParamsError, T]

    Retrieves the first typed query parameter value having the specified name.

    Retrieves the first typed query parameter value having the specified name.

    Definition Classes
    QueryGetters
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use query(key)[T]

  3. def queryParamToOrElse[T](key: String, default: => T)(implicit codec: TextCodec[T]): T

    Retrieves the first typed query parameter value having the specified name, or else uses the default value.

    Retrieves the first typed query parameter value having the specified name, or else uses the default value.

    Definition Classes
    QueryGetters
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use queryParamOrElse(key, default)

  4. def queryParamToZIO[T](key: String)(implicit codec: TextCodec[T]): IO[QueryParamsError, T]

    Retrieves the first typed query parameter value having the specified name as ZIO.

    Retrieves the first typed query parameter value having the specified name as ZIO.

    Definition Classes
    QueryGetters
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use queryZIO(key)[T]

  5. def queryParamsTo[T](key: String)(implicit codec: TextCodec[T]): Either[QueryParamsError, Chunk[T]]

    Retrieves all typed query parameter values having the specified name.

    Retrieves all typed query parameter values having the specified name.

    Definition Classes
    QueryGetters
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use query(key)[Chunk[T]

  6. def queryParamsToOrElse[T](key: String, default: => Iterable[T])(implicit codec: TextCodec[T]): Chunk[T]

    Retrieves all query parameter values having the specified name, or else uses the default iterable.

    Retrieves all query parameter values having the specified name, or else uses the default iterable.

    Definition Classes
    QueryGetters
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use queryParamsOrElse(key, default)

  7. def queryParamsToZIO[T](key: String)(implicit codec: TextCodec[T]): IO[QueryParamsError, Chunk[T]]

    Retrieves all typed query parameter values having the specified name as ZIO.

    Retrieves all typed query parameter values having the specified name as ZIO.

    Definition Classes
    QueryGetters
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) Use queryZIO(key)[Chunk[T]

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from QueryOps[Request]

Inherited from QueryChecks[Request]

Inherited from QueryGetters[Request]

Inherited from QueryModifier[Request]

Inherited from HeaderOps[Request]

Inherited from HeaderChecks[Request]

Inherited from HeaderGetters

Inherited from HeaderModifier[Request]

Inherited from AnyRef

Inherited from Any

Ungrouped