Packages

c

lol.http

Request

case class Request(method: HttpMethod, url: String = "/", scheme: String = "http", content: Content = Content.empty, headers: Map[HttpString, HttpString] = Map.empty, protocol: String = HTTP, from: Option[InetAddress] = None) extends Product with Serializable

An HTTP request.

Represent all the data available in the HTTP request headers, and the request content that can be consumed lazily if needed.

method

the HTTP method such as GET or POST.

url

the resource URL.

scheme

the scheme such as http or https.

content

the request content.

headers

the HTTP headers.

protocol

the protocol version.

Source
Request.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Request
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Request(method: HttpMethod, url: String = "/", scheme: String = "http", content: Content = Content.empty, headers: Map[HttpString, HttpString] = Map.empty, protocol: String = HTTP, from: Option[InetAddress] = None)

    method

    the HTTP method such as GET or POST.

    url

    the resource URL.

    scheme

    the scheme such as http or https.

    content

    the request content.

    headers

    the HTTP headers.

    protocol

    the protocol version.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addHeaders(headers: (HttpString, HttpString)*): Request

    Add some headers to this request.

    Add some headers to this request.

    headers

    the new headers to add.

    returns

    a copy of the request with the new headers added.

  5. def addHeaders(headers: Map[HttpString, HttpString]): Request

    Add some headers to this request.

    Add some headers to this request.

    headers

    the new headers to add.

    returns

    a copy of the request with the new headers added.

  6. def apply[A](content: A)(implicit encoder: ContentEncoder[A]): Request

    Set the content of this request.

    Set the content of this request.

    content

    the content to use for this request.

    encoder

    the ContentEncoder to use to encode this content.

    returns

    a copy of this request with a new content.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  9. val content: Content
  10. def drain: IO[Unit]

    Drain the content attached to this request.

    Drain the content attached to this request. It is safe to call this operation even if the stream has already been consumed.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. val from: Option[InetAddress]
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. val headers: Map[HttpString, HttpString]
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. val method: HttpMethod
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. lazy val parsedQueryString: List[(String, String)]

    The queryString parsed as a sequence of key=value parameters.

  22. lazy val path: String

    The path part of the URL (ie.

    The path part of the URL (ie. without the queryString).

  23. val protocol: String
  24. lazy val queryString: Option[String]

    The queryString part of the URL.

  25. lazy val queryStringParameters: Map[String, String]

    The queryString parameters.

    The queryString parameters. Duplicated parameters are ignored, only the first value is available.

  26. def read[A](effect: (Stream[IO, Byte]) ⇒ IO[A]): IO[A]

    Consume the content attached to this request by evaluating the provided effect function.

    Consume the content attached to this request by evaluating the provided effect function.

    effect

    the function to use to consume the stream.

    returns

    eventually a value of type A.

  27. def readAs[A](implicit decoder: ContentDecoder[A]): IO[A]

    Consume the content attached to this request and eventually produces a value of type A.

    Consume the content attached to this request and eventually produces a value of type A.

    decoder

    the ContentDecoder to use to read the content.

    returns

    eventually a value of type A.

  28. def removeHeaders(headerNames: HttpString*): Request

    Remove some headers from this request.

    Remove some headers from this request.

    headerNames

    the header names to remove

    returns

    a copy of the request without the removed headers.

  29. val scheme: String
  30. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  31. val url: String
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped