Class

io.finch.response

ResponseBuilder

Related Doc: package response

Permalink

case class ResponseBuilder(status: Status, headers: Map[String, String] = Map.empty[String, String], cookies: Seq[Cookie] = Seq.empty[Cookie], contentType: Option[String] = None, charset: Option[String] = None) extends Product with Serializable

An abstraction that is responsible for building HTTP responses.

status

the HTTP response status

headers

the HTTP headers map

cookies

the HTTP cookies list

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ResponseBuilder
  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 ResponseBuilder(status: Status, headers: Map[String, String] = Map.empty[String, String], cookies: Seq[Cookie] = Seq.empty[Cookie], contentType: Option[String] = None, charset: Option[String] = None)

    Permalink

    status

    the HTTP response status

    headers

    the HTTP headers map

    cookies

    the HTTP cookies list

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 apply(): Response

    Permalink

    Builds an empty HTTP response.

  5. def apply[A](body: A)(implicit encode: EncodeResponse[A]): Response

    Permalink

    Builds an HTTP response of the given body with content-type according to the implicit EncodeResponse.

    Builds an HTTP response of the given body with content-type according to the implicit EncodeResponse.

    body

    the response body

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. val charset: Option[String]

    Permalink
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val contentType: Option[String]

    Permalink
  10. val cookies: Seq[Cookie]

    Permalink

    the HTTP cookies list

  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[String, String]

    Permalink

    the HTTP headers map

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  19. val status: Status

    Permalink

    the HTTP response status

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

    Permalink
    Definition Classes
    AnyRef
  21. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. def withCharset(charset: Option[String]): ResponseBuilder

    Permalink

    Creates a new response builder with given charset.

    Creates a new response builder with given charset.

    charset

    the charset to be used instead

  25. def withContentType(contentType: Option[String]): ResponseBuilder

    Permalink

    Creates a new response builder with given contentType.

    Creates a new response builder with given contentType.

    contentType

    the content type to be used instead

  26. def withCookies(cookies: Cookie*): ResponseBuilder

    Permalink

    Creates a new response builder with the given cookies.

    Creates a new response builder with the given cookies.

    cookies

    the Cookie's to add to the response

  27. def withHeaders(headers: (String, String)*): ResponseBuilder

    Permalink

    Creates a new response builder with the given headers.

    Creates a new response builder with the given headers.

    headers

    the HTTP headers map

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped