An HTTP middleware that authenticates users.
An HTTP middleware converts an HttpService to another.
A middleware is a function of one Service to another, possibly of a different Request and Response type.
A middleware is a function of one Service to another, possibly of a different Request and Response type. http4s comes with several middlewares for composing common functionality into services.
Starts a server and gracefully terminates at shutdown.
Starts a server and gracefully terminates at shutdown. The server
is terminated and the shutdown task is run either by a JVM shutdown
hook or an invocation of requestShutdown()
.
If the server fails to start, the shutdown
task is not invoked.
More robust resource management is possible through ProcessApp
or
StreamApp
, which are introduced in http4s-0.16 and http4s-0.17,
respectively.
Helpers for serving static content from http4s
Helpers for serving static content from http4s
Note that these tools are relatively primitive and a dedicated server should be used for serious static content serving.