Packages

object Handler

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

Type Members

  1. final class ContraFlatMap[-R, +Err, -In, +Out, In1] extends AnyVal
  2. final class FromFunction[In] extends AnyVal
  3. final class FromFunctionExit[In] extends AnyVal
  4. final class FromFunctionHandler[In] extends AnyVal
  5. final class FromFunctionZIO[In] extends AnyVal
  6. implicit final class RequestHandlerSyntax[-R, +Err] extends HeaderModifierZIO[RequestHandler[R, Err]]
  7. implicit final class ResponseOutputSyntax[-R, +Err, -In] extends AnyVal

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 attempt[Out](out: => Out): Handler[Any, Throwable, Any, Out]

    Attempts to create a Handler that succeeds with the provided value, capturing all exceptions on it's way.

  6. def badRequest(message: String): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 400 status code.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def die(failure: => Throwable): Handler[Any, Nothing, Any, Nothing]

    Returns a handler that dies with the specified Throwable.

    Returns a handler that dies with the specified Throwable. This method can be used for terminating an app because a defect has been detected in the code. Terminating a handler leads to aborting handling of an HTTP request and responding with 500 Internal Server Error.

  9. def dieMessage(message: => String): Handler[Any, Nothing, Any, Nothing]

    Returns an app that dies with a RuntimeException having the specified text message.

    Returns an app that dies with a RuntimeException having the specified text message. This method can be used for terminating a HTTP request because a defect has been detected in the code.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. def error(message: String): Handler[Any, Nothing, Any, Response]

    Creates a handler that responds with 500 status code

  13. def error(error: HttpError): Handler[Any, Nothing, Any, Response]

    Creates a handler with HttpError.

  14. def fail[Err](err: => Err): Handler[Any, Err, Any, Nothing]

    Creates a Handler that always fails

  15. def failCause[Err](cause: => Cause[Err]): Handler[Any, Err, Any, Nothing]
  16. def forbidden(message: String): Handler[Any, Nothing, Any, Response]

    Creates a handler that responds with 403 - Forbidden status code

  17. def fromBody(body: Body): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds the provided data and a 200 status code

  18. def fromEither[Err, Out](either: Either[Err, Out]): Handler[Any, Err, Any, Out]

    Lifts an Either into a Handler alue.

  19. def fromExit[Err, Out](exit: => Exit[Err, Out]): Handler[Any, Err, Any, Out]
  20. def fromFunction[In]: FromFunction[In]

    Creates a Handler from a pure function

  21. def fromFunctionExit[In]: FromFunctionExit[In]

    Creates a Handler from an pure function from A to HExit[R,E,B]

  22. def fromFunctionHandler[In]: FromFunctionHandler[In]
  23. def fromFunctionZIO[In]: FromFunctionZIO[In]

    Creates a Handler from an effectful pure function

  24. def fromHttp[R, Err, In, Out](http: Http[R, Err, In, Out], default: Handler[R, Err, In, Out])(implicit trace: Trace): Handler[R, Err, In, Out]
  25. def fromStream[R](stream: ZStream[R, Throwable, Byte])(implicit trace: Trace): Handler[R, Throwable, Any, Response]

    Creates a Handler that always succeeds with a 200 status code and the provided ZStream as the body

  26. def fromStream[R](stream: ZStream[R, Throwable, String], charset: Charset = HTTP_CHARSET)(implicit trace: Trace): Handler[R, Throwable, Any, Response]

    Creates a Handler that always succeeds with a 200 status code and the provided ZStream as the body

  27. def fromZIO[R, Err, Out](zio: => ZIO[R, Err, Out]): Handler[R, Err, Any, Out]

    Converts a ZIO to a Handler type

  28. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  29. def getResource(path: String)(implicit trace: Trace): Handler[Any, Throwable, Any, java.net.URL]

    Attempts to retrieve files from the classpath.

  30. def getResourceAsFile(path: String)(implicit trace: Trace): Handler[Any, Throwable, Any, File]

    Attempts to retrieve files from the classpath.

  31. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  32. def html(view: Html): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the provided Html page.

  33. def identity[A]: Handler[Any, Nothing, A, A]

    Creates a pass thru Handler instance

  34. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  35. def methodNotAllowed(message: String): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 405 status code.

  36. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  37. def notFound: Handler[Any, Nothing, Request, Response]

    Creates a handler that fails with a NotFound exception.

  38. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  39. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  40. def ok: Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 200 status code.

  41. def response(response: Response): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the same value.

  42. def responseZIO[R, Err](getResponse: ZIO[R, Err, Response]): Handler[R, Err, Any, Response]

    Converts a ZIO to a handler type

  43. def stackTrace(implicit trace: Trace): Handler[Any, Nothing, Any, StackTrace]
  44. def status(code: Status): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the same status code and empty data.

  45. def succeed[Out](out: Out): Handler[Any, Nothing, Any, Out]

    Creates a Handler that always returns the same response and never fails.

  46. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  47. def template(heading: CharSequence)(view: Html): Handler[Any, Nothing, Any, Response]

    Creates a handler which responds with an Html page using the built-in template.

  48. def text(text: CharSequence): Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with the same plain text.

  49. def timeout(duration: zio.Duration)(implicit trace: Trace): Handler[Any, Nothing, Any, Response]

    Creates a handler that responds with a 408 status code after the provided time duration

  50. def toString(): String
    Definition Classes
    AnyRef → Any
  51. def tooLarge: Handler[Any, Nothing, Any, Response]

    Creates a handler which always responds with a 413 status code.

  52. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  53. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  54. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

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

Inherited from AnyRef

Inherited from Any

Ungrouped