object Http
- Alphabetic
- By Inheritance
- Http
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- implicit final class HttpAppSyntax[-R, +E] extends HeaderModifier[HttpApp[R, E]]
- final case class PartialCollect[A](unit: Unit) extends AnyVal with Product with Serializable
- final case class PartialCollectHExit[A](unit: Unit) extends AnyVal with Product with Serializable
- final case class PartialCollectHttp[A](unit: Unit) extends AnyVal with Product with Serializable
- final case class PartialCollectZIO[A](unit: Unit) extends AnyVal with Product with Serializable
- final case class PartialContraFlatMap[-R, +E, -A, +B, X](self: Http[R, E, A, B]) extends AnyVal with Product with Serializable
- final class PartialFromFunction[A] extends AnyVal
- final class PartialFromFunctionHExit[A] extends AnyVal
- final class PartialFromFunctionZIO[A] extends AnyVal
- final class PartialFromOptionFunction[A] extends AnyVal
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[B](b: B): Http[Any, Nothing, Any, B]
Equivalent to
Http.succeed -
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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.
-
def
badRequest(msg: String): HttpApp[Any, Nothing]
Creates an HTTP app which always responds with a 400 status code.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
collect[A]: PartialCollect[A]
Creates an HTTP app which accepts a request and produces response.
-
def
collectHExit[A]: PartialCollectHExit[A]
Create an HTTP app from a partial function from A to HExit[R,E,B]
-
def
collectHttp[A]: PartialCollectHttp[A]
Create an HTTP app from a partial function from A to Http[R,E,A,B]
-
def
collectZIO[A]: PartialCollectZIO[A]
Creates an HTTP app which accepts a request and produces response effectfully.
-
def
combine[R, E, A, B](i: Iterable[Http[R, E, A, B]]): Http[R, E, A, B]
Combines multiple Http apps into one
-
def
context: Http[Any, Nothing, Request, ChannelHandlerContext]
Provides access to the request's ChannelHandlerContext
-
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. -
def
dieMessage(message: ⇒ String): UHttp[Any, Nothing]
Returns an app that dies with a
RuntimeExceptionhaving the specified text message.Returns an app that dies with a
RuntimeExceptionhaving the specified text message. This method can be used for terminating a HTTP request because a defect has been detected in the code. -
def
empty: Http[Any, Nothing, Any, Nothing]
Creates an empty Http value
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
error(msg: String): HttpApp[Any, Nothing]
Creates an Http app that responds with 500 status code
-
def
error(cause: HttpError): HttpApp[Any, Nothing]
Creates an HTTP app with HttpError.
-
def
fail[E](e: E): Http[Any, E, Any, Nothing]
Creates an Http that always fails
-
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
-
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
-
def
forbidden(msg: String): HttpApp[Any, Nothing]
Creates an Http app that responds with 403 - Forbidden status code
-
def
fromData(data: HttpData): HttpApp[Any, Nothing]
Creates an Http app which always responds the provided data and a 200 status code
-
def
fromEither[E, A](v: Either[E, A]): Http[Any, E, Any, A]
Lifts an
Eitherinto aHttpvalue. -
def
fromFile(file: ⇒ File): HttpApp[Any, Throwable]
Creates an Http app from the contents of a file.
-
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.
-
def
fromFunction[A]: PartialFromFunction[A]
Creates a Http from a pure function
-
def
fromFunctionHExit[A]: PartialFromFunctionHExit[A]
Creates a Http from an pure function from A to HExit[R,E,B]
-
def
fromFunctionZIO[A]: PartialFromFunctionZIO[A]
Creates a Http from an effectful pure function
-
def
fromHExit[R, E, B](h: HExit[R, E, B]): Http[R, E, Any, B]
Creates a Http from HExit[R,E,B]
-
def
fromOption[A](v: Option[A]): Http[Any, Option[Nothing], Any, A]
Lifts an
Optioninto aHttpvalue. -
def
fromOptionFunction[A]: PartialFromOptionFunction[A]
Creates an
Httpfrom a function that takes a value of typeAand returns with aZIO[R, Option[E], B].Creates an
Httpfrom a function that takes a value of typeAand returns with aZIO[R, Option[E], B]. The returned effect can fail with aNoneto signal "not found" to the backend. -
def
fromPath(head: String, tail: String*): HttpApp[Any, Throwable]
Creates an HTTP that can serve files on the give path.
-
def
fromResource(path: String): HttpApp[Any, Throwable]
Creates an Http app from a resource path
-
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
-
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
-
def
fromZIO[R, E, B](effect: ZIO[R, E, B]): Http[R, E, Any, B]
Converts a ZIO to an Http type
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
getResource(path: String): Http[Any, Throwable, Any, java.net.URL]
Attempts to retrieve files from the classpath.
-
def
getResourceAsFile(path: String): Http[Any, Throwable, Any, File]
Attempts to retrieve files from the classpath.
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
html(view: Html): HttpApp[Any, Nothing]
Creates an HTTP app which always responds with the provided Html page.
-
def
identity[A]: Http[Any, Nothing, A, A]
Creates a pass thru Http instance
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
methodNotAllowed(msg: String): HttpApp[Any, Nothing]
Creates an HTTP app which always responds with a 405 status code.
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
notFound: HttpApp[Any, Nothing]
Creates an Http app that fails with a NotFound exception.
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
ok: HttpApp[Any, Nothing]
Creates an HTTP app which always responds with a 200 status code.
-
def
remoteAddress: Http[Any, IOException, Request, InetAddress]
Provides access to the request's remote address
-
def
response(response: Response): Http[Any, Nothing, Any, Response]
Creates an Http app which always responds with the same value.
-
def
responseZIO[R, E](res: ZIO[R, E, Response]): HttpApp[R, E]
Converts a ZIO to an Http app type
-
def
status(code: Status): HttpApp[Any, Nothing]
Creates an HTTP app which always responds with the same status code and empty data.
-
def
succeed[B](b: B): Http[Any, Nothing, Any, B]
Creates an Http that always returns the same response and never fails.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
template(heading: CharSequence)(view: Html): HttpApp[Any, Nothing]
Creates an Http app which responds with an Html page using the built-in template.
-
def
text(charSeq: CharSequence): HttpApp[Any, Nothing]
Creates an Http app which always responds with the same plain text.
-
def
timeout(duration: zio.Duration): HttpApp[Any, Nothing]
Creates an Http app that responds with a 408 status code after the provided time duration
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tooLarge: HttpApp[Any, Nothing]
Creates an HTTP app which always responds with a 413 status code.
-
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.
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )