A functional domain to model Http apps using ZIO and that can work over any kind of request and response types.
- Companion:
- object
Value members
Concrete methods
Runs self but if it fails, runs other, ignoring the result from self.
Runs self but if it fails, runs other, ignoring the result from self.
Attaches the provided middleware to the Http app
Attaches the provided middleware to the Http app
Combines two Http instances into a middleware that works a codec for incoming and outgoing messages.
Combines two Http instances into a middleware that works a codec for incoming and outgoing messages.
Returns an http app that submerges the error case of an Either
into the
Http
. The inverse operation of Http.either
.
Returns an http app that submerges the error case of an Either
into the
Http
. The inverse operation of Http.either
.
Catches all the exceptions that the http app can fail with
Catches all the exceptions that the http app can fail with
Recovers from all defects with provided function.
Recovers from all defects with provided function.
'''WARNING''': There is no sensible way to recover from defects. This
method should be used only at the boundary between Http
and an external
system, to transmit information on a defect for diagnostic or explanatory
purposes.
Recovers from all NonFatal Throwables.
Recovers from all NonFatal Throwables.
Recovers from some or all of the error cases.
Recovers from some or all of the error cases.
Recovers from some or all of the defects with provided partial function.
Recovers from some or all of the defects with provided partial function.
'''WARNING''': There is no sensible way to recover from defects. This
method should be used only at the boundary between Http
and an external
system, to transmit information on a defect for diagnostic or explanatory
purposes.
Combines two Http instances into a middleware that works a codec for incoming and outgoing messages.
Combines two Http instances into a middleware that works a codec for incoming and outgoing messages.
Collects some of the results of the http and converts it to another type.
Collects some of the results of the http and converts it to another type.
Collects some of the results of the http and effectfully converts it to another type.
Collects some of the results of the http and effectfully converts it to another type.
Extracts content-length from the response if available
Extracts content-length from the response if available
Transforms the input of the http before passing it on to the current Http
Transforms the input of the http before passing it on to the current Http
Transforms the input of the http before passing it on to the current Http
Transforms the input of the http before passing it on to the current Http
Transforms the input of the http before giving it effectfully
Transforms the input of the http before giving it effectfully
Named alias for ++
Named alias for ++
Delays production of output B for the specified duration of time
Delays production of output B for the specified duration of time
Delays production of output B for the specified duration of time
Delays production of output B for the specified duration of time
Delays consumption of input A for the specified duration of time
Delays consumption of input A for the specified duration of time
Returns an http app whose failure and success have been lifted into an
Either
. The resulting app cannot fail, because the failure case has been
exposed as part of the Either
success case.
Returns an http app whose failure and success have been lifted into an
Either
. The resulting app cannot fail, because the failure case has been
exposed as part of the Either
success case.
Folds over the http app by taking in two functions one for success and one for failure respectively.
Folds over the http app by taking in two functions one for success and one for failure respectively.
Extracts the value of the provided header name.
Extracts the value of the provided header name.
Returns a new Http where the error channel has been merged into the success channel to their common combined type.
Returns a new Http where the error channel has been merged into the success channel to their common combined type.
Named alias for @@
Named alias for @@
Executes this app, skipping the error but returning optionally the success.
Executes this app, skipping the error but returning optionally the success.
Converts an option on errors into an option on values.
Converts an option on errors into an option on values.
Translates app failure into death of the app, making all failures unchecked and not a part of the type of the app.
Translates app failure into death of the app, making all failures unchecked and not a part of the type of the app.
Keeps none of the errors, and terminates the http app with them, using the
specified function to convert the E
into a Throwable
.
Keeps none of the errors, and terminates the http app with them, using the
specified function to convert the E
into a Throwable
.
Provides some of the environment to Http leaving the remainder R0
.
Provides some of the environment to Http leaving the remainder R0
.
Keeps some of the errors, and terminates the http app with the rest.
Keeps some of the errors, and terminates the http app with the rest.
Keeps some of the errors, and terminates the http app with the rest, using
the specified function to convert the E
into a Throwable
.
Keeps some of the errors, and terminates the http app with the rest, using
the specified function to convert the E
into a Throwable
.
Returns an Http that peeks at the success of this Http.
Returns an Http that peeks at the success of this Http.
Returns an Http that peeks at the success, failed, defective or empty value of this Http.
Returns an Http that peeks at the success, failed, defective or empty value of this Http.
Returns an Http that effectfully peeks at the success, failed, defective or empty value of this Http.
Returns an Http that effectfully peeks at the success, failed, defective or empty value of this Http.
Returns an Http that peeks at the failure of this Http.
Returns an Http that peeks at the failure of this Http.
Returns an Http that effectfully peeks at the failure of this Http.
Returns an Http that effectfully peeks at the failure of this Http.
Returns an Http that effectfully peeks at the success of this Http.
Returns an Http that effectfully peeks at the success of this Http.
Takes some defects and converts them into failures.
Takes some defects and converts them into failures.
Takes some defects and converts them into failures.
Takes some defects and converts them into failures.
Takes some defects and converts them into failures, using the specified
function to convert the E
into an E1
.
Takes some defects and converts them into failures, using the specified
function to convert the E
into an E1
.
Applies Http based only if the condition function evaluates to true
Applies Http based only if the condition function evaluates to true