io.finch.response

ResponseBuilder

case class ResponseBuilder(status: Status, headers: Map[String, String] = ..., cookies: Seq[Cookie] = ..., contentType: Option[String] = scala.None, charset: Option[String] = scala.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

Annotations
@deprecated
Deprecated

(Since version 0.9.1) Use Endpoint.Output instead

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
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
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ResponseBuilder(status: Status, headers: Map[String, String] = ..., cookies: Seq[Cookie] = ..., contentType: Option[String] = scala.None, charset: Option[String] = scala.None)

    status

    the HTTP response status

    headers

    the HTTP headers map

    cookies

    the HTTP cookies list

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def apply(): Response

    Builds an empty HTTP response.

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

    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

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val charset: Option[String]

  10. def clone(): AnyRef

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

  12. val cookies: Seq[Cookie]

    the HTTP cookies list

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  16. val headers: Map[String, String]

    the HTTP headers map

  17. final def isInstanceOf[T0]: Boolean

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

    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  21. val status: Status

    the HTTP response status

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

    Definition Classes
    AnyRef
  23. final def wait(): Unit

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

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

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

    Creates a new response builder with given charset.

    Creates a new response builder with given charset.

    charset

    the charset to be used instead

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

    Creates a new response builder with given contentType.

    Creates a new response builder with given contentType.

    contentType

    the content type to be used instead

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

    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

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

    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