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) 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.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
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)

    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.

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
    @throws( ... )
  9. val content: Content
  10. def drain: Future[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. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  14. val headers: Map[HttpString, HttpString]
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. val method: HttpMethod
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  20. lazy val path: String

    The path part of the URL (ie.

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

  21. lazy val queryString: Option[String]

    The queryString part of the URL.

  22. def read[A](effect: (Stream[Task, Byte]) ⇒ Task[A]): Future[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.

  23. def readAs[A](implicit decoder: ContentDecoder[A]): Future[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.

  24. 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.

  25. val scheme: String
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. val url: String
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped