Packages

object Response extends Serializable

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Response
  2. Serializable
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed trait Patch extends AnyRef

    Models the set of operations that one would want to apply on a Response.

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def badGateway(message: String): Response
  6. def badGateway: Response
  7. def badRequest(message: String): Response
  8. def badRequest: Response
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def error(status: Error): Response
  13. def error(status: Error, body: Body): Response
  14. def error(status: Error, message: String): Response
  15. def forbidden(message: String): Response
  16. def forbidden: Response
  17. def fromCause(cause: Cause[Any], config: ErrorResponseConfig): Response

    Creates a new response from the specified cause.

    Creates a new response from the specified cause. Note that this method is not polymorphic, but will attempt to inspect the runtime class of the failure inside the cause, if any.

    Annotations
    @tailrec()
  18. def fromCause(cause: Cause[Any]): Response
  19. def fromCauseWith[E](cause: Cause[E], config: ErrorResponseConfig)(f: (E) => Response): Response

    Creates a new response from the specified cause, translating any typed error to a response using the provided function.

  20. def fromServerSentEvent[T](data: ServerSentEvent[T])(implicit arg0: Schema[T], trace: Trace): Response
  21. def fromServerSentEvents[T](data: Iterable[ServerSentEvent[T]])(implicit arg0: Schema[T], trace: Trace): Response
  22. def fromServerSentEvents[T](data: ZStream[Any, Nothing, ServerSentEvent[T]])(implicit arg0: Schema[T], trace: Trace): Response

    Creates a response with content-type set to text/event-stream

    Creates a response with content-type set to text/event-stream

    data

    \- stream of data to be sent as Server Sent Events

  23. def fromSocketApp[R](app: WebSocketApp[R])(implicit trace: Trace): ZIO[R, Nothing, Response]

    Creates a new response for the provided socket app

  24. def fromThrowable(throwable: Throwable, config: ErrorResponseConfig): Response

    Creates a new response for the specified throwable.

    Creates a new response for the specified throwable. Note that this method relies on the runtime class of the throwable.

  25. def fromThrowable(throwable: Throwable): Response
  26. def gatewayTimeout(message: String): Response
  27. def gatewayTimeout: Response
  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  29. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  30. def html(data: Dom, status: Status): Response

    Creates a response with content-type set to text/html

  31. def html(data: Dom): Response

    Creates a response with content-type set to text/html

  32. def html(data: Html, status: Status = Status.Ok): Response

    Creates a response with content-type set to text/html

  33. def httpVersionNotSupported(message: String): Response
  34. def httpVersionNotSupported: Response
  35. def internalServerError(message: String): Response
  36. def internalServerError: Response
  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. def json(data: CharSequence): Response

    Creates a response with content-type set to application/json

  39. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  40. def networkAuthenticationRequired(message: String): Response
  41. def networkAuthenticationRequired: Response
  42. def notExtended(message: String): Response
  43. def notExtended: Response
  44. def notFound(message: String): Response
  45. def notFound: Response
  46. def notImplemented(message: String): Response
  47. def notImplemented: Response
  48. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  49. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  50. def ok: Response

    Creates an empty response with status 200

  51. def redirect(location: URL, isPermanent: Boolean = false): Response

    Creates an empty response with status 307 or 308 depending on if it's permanent or not.

    Creates an empty response with status 307 or 308 depending on if it's permanent or not.

    Note: if you intend to always redirect a browser with a HTTP GET to the given location you very likely should use Response#seeOther instead.

  52. def seeOther(location: URL): Response

    Creates an empty response with status 303.

  53. def serviceUnavailable(message: String): Response
  54. def serviceUnavailable: Response
  55. def status(status: Status): Response

    Creates an empty response with the provided Status

  56. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  57. def text(text: CharSequence): Response

    Creates a response with content-type set to text/plain

  58. def toString(): String
    Definition Classes
    AnyRef → Any
  59. def unauthorized(message: String): Response
  60. def unauthorized: Response
  61. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  62. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  63. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  64. object Patch

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped