object Http

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

Type Members

  1. implicit final class HttpAppSyntax[-R, +E] extends HeaderModifier[HttpApp[R, E]]
  2. final case class PartialCollect[A](unit: Unit) extends AnyVal with Product with Serializable
  3. final case class PartialCollectHExit[A](unit: Unit) extends AnyVal with Product with Serializable
  4. final case class PartialCollectHttp[A](unit: Unit) extends AnyVal with Product with Serializable
  5. final case class PartialCollectZIO[A](unit: Unit) extends AnyVal with Product with Serializable
  6. final case class PartialContraFlatMap[-R, +E, -A, +B, X](self: Http[R, E, A, B]) extends AnyVal with Product with Serializable
  7. final class PartialFromFunction[A] extends AnyVal
  8. final class PartialFromFunctionHExit[A] extends AnyVal
  9. final class PartialFromFunctionZIO[A] extends AnyVal
  10. final class PartialFromOptionFunction[A] 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. def apply[B](b: B): Http[Any, Nothing, Any, B]

    Equivalent to Http.succeed

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def attempt[A](a: ⇒ A): Http[Any, Throwable, Any, A]

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

  7. def badRequest(msg: String): HttpApp[Any, Nothing]

    Creates an HTTP app which always responds with a 400 status code.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  9. def collect[A]: PartialCollect[A]

    Creates an HTTP app which accepts a request and produces response.

  10. def collectHExit[A]: PartialCollectHExit[A]

    Create an HTTP app from a partial function from A to HExit[R,E,B]

  11. def collectHttp[A]: PartialCollectHttp[A]

    Create an HTTP app from a partial function from A to Http[R,E,A,B]

  12. def collectZIO[A]: PartialCollectZIO[A]

    Creates an HTTP app which accepts a request and produces response effectfully.

  13. def combine[R, E, A, B](i: Iterable[Http[R, E, A, B]]): Http[R, E, A, B]

    Combines multiple Http apps into one

  14. def context: Http[Any, Nothing, Request, ChannelHandlerContext]

    Provides access to the request's ChannelHandlerContext

  15. def die(t: Throwable): UHttp[Any, Nothing]

    Returns an http app that dies with the specified Throwable.

    Returns an http app 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 an http app leads to aborting handling of an HTTP request and responding with 500 Internal Server Error.

  16. def dieMessage(message: ⇒ String): UHttp[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.

  17. def empty: Http[Any, Nothing, Any, Nothing]

    Creates an empty Http value

  18. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  20. def error(msg: String): HttpApp[Any, Nothing]

    Creates an Http app that responds with 500 status code

  21. def error(cause: HttpError): HttpApp[Any, Nothing]

    Creates an HTTP app with HttpError.

  22. def fail[E](e: E): Http[Any, E, Any, Nothing]

    Creates an Http that always fails

  23. def flatten[R, E, A, B](http: Http[R, E, A, Http[R, E, A, B]]): Http[R, E, A, B]

    Flattens an Http app of an Http app

  24. def flattenZIO[R, E, A, B](http: Http[R, E, A, ZIO[R, E, B]]): Http[R, E, A, B]

    Flattens an Http app of an that returns an effectful response

  25. def forbidden(msg: String): HttpApp[Any, Nothing]

    Creates an Http app that responds with 403 - Forbidden status code

  26. def fromData(data: HttpData): HttpApp[Any, Nothing]

    Creates an Http app which always responds the provided data and a 200 status code

  27. def fromEither[E, A](v: Either[E, A]): Http[Any, E, Any, A]

    Lifts an Either into a Http value.

  28. def fromFile(file: ⇒ File): HttpApp[Any, Throwable]

    Creates an Http app from the contents of a file.

  29. def fromFileZIO[R](fileZIO: ZIO[R, Throwable, File]): HttpApp[R, Throwable]

    Creates an Http app from the contents of a file which is produced from an effect.

    Creates an Http app from the contents of a file which is produced from an effect. The operator automatically adds the content-length and content-type headers if possible.

  30. def fromFunction[A]: PartialFromFunction[A]

    Creates a Http from a pure function

  31. def fromFunctionHExit[A]: PartialFromFunctionHExit[A]

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

  32. def fromFunctionZIO[A]: PartialFromFunctionZIO[A]

    Creates a Http from an effectful pure function

  33. def fromHExit[R, E, B](h: HExit[R, E, B]): Http[R, E, Any, B]

    Creates a Http from HExit[R,E,B]

  34. def fromOption[A](v: Option[A]): Http[Any, Option[Nothing], Any, A]

    Lifts an Option into a Http value.

  35. def fromOptionFunction[A]: PartialFromOptionFunction[A]

    Creates an Http from a function that takes a value of type A and returns with a ZIO[R, Option[E], B].

    Creates an Http from a function that takes a value of type A and returns with a ZIO[R, Option[E], B]. The returned effect can fail with a None to signal "not found" to the backend.

  36. def fromPath(head: String, tail: String*): HttpApp[Any, Throwable]

    Creates an HTTP that can serve files on the give path.

  37. def fromResource(path: String): HttpApp[Any, Throwable]

    Creates an Http app from a resource path

  38. def fromStream[R](stream: ZStream[R, Throwable, Byte]): HttpApp[R, Nothing]

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

  39. def fromStream[R](stream: ZStream[R, Throwable, String], charset: Charset = HTTP_CHARSET): HttpApp[R, Nothing]

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

  40. def fromZIO[R, E, B](effect: ZIO[R, E, B]): Http[R, E, Any, B]

    Converts a ZIO to an Http type

  41. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  42. def getResource(path: String): Http[Any, Throwable, Any, java.net.URL]

    Attempts to retrieve files from the classpath.

  43. def getResourceAsFile(path: String): Http[Any, Throwable, Any, File]

    Attempts to retrieve files from the classpath.

  44. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  45. def html(view: Html): HttpApp[Any, Nothing]

    Creates an HTTP app which always responds with the provided Html page.

  46. def identity[A]: Http[Any, Nothing, A, A]

    Creates a pass thru Http instance

  47. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  48. def methodNotAllowed(msg: String): HttpApp[Any, Nothing]

    Creates an HTTP app which always responds with a 405 status code.

  49. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  50. def notFound: HttpApp[Any, Nothing]

    Creates an Http app that fails with a NotFound exception.

  51. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  52. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  53. def ok: HttpApp[Any, Nothing]

    Creates an HTTP app which always responds with a 200 status code.

  54. def remoteAddress: Http[Any, IOException, Request, InetAddress]

    Provides access to the request's remote address

  55. def response(response: Response): Http[Any, Nothing, Any, Response]

    Creates an Http app which always responds with the same value.

  56. def responseZIO[R, E](res: ZIO[R, E, Response]): HttpApp[R, E]

    Converts a ZIO to an Http app type

  57. def status(code: Status): HttpApp[Any, Nothing]

    Creates an HTTP app which always responds with the same status code and empty data.

  58. def succeed[B](b: B): Http[Any, Nothing, Any, B]

    Creates an Http that always returns the same response and never fails.

  59. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  60. def template(heading: CharSequence)(view: Html): HttpApp[Any, Nothing]

    Creates an Http app which responds with an Html page using the built-in template.

  61. def text(charSeq: CharSequence): HttpApp[Any, Nothing]

    Creates an Http app which always responds with the same plain text.

  62. def timeout(duration: zio.Duration): HttpApp[Any, Nothing]

    Creates an Http app that responds with a 408 status code after the provided time duration

  63. def toString(): String
    Definition Classes
    AnyRef → Any
  64. def tooLarge: HttpApp[Any, Nothing]

    Creates an HTTP app which always responds with a 413 status code.

  65. def usingContext[R, E](f: (ChannelHandlerContext) ⇒ HttpApp[R, E]): HttpApp[R, E]

    Provides low level access to an HttpApp to perform unsafe operations using the request's ChannelHandlerContext.

  66. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  67. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  68. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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