Class

lol.http

Request

Related Doc: package http

Permalink

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)

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addHeaders(headers: (HttpString, HttpString)*): Request

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val content: Content

    Permalink

    the request content.

  10. def drain: Future[Unit]

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. val headers: Map[HttpString, HttpString]

    Permalink

    the HTTP headers.

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val method: HttpMethod

    Permalink

    the HTTP method such as GET or POST.

  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. lazy val path: String

    Permalink

    The path part of the URL (ie.

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

  21. lazy val queryString: Option[String]

    Permalink

    The queryString part of the URL.

  22. def read[A](effect: (Stream[Task, Byte]) ⇒ Task[A]): Future[A]

    Permalink

    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]

    Permalink

    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

    Permalink

    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

    Permalink

    the scheme such as http or https.

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. val url: String

    Permalink

    the resource URL.

  28. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped