Shuttle_http.ServerSourcetype error_handler =
?exn:exn ->
?request:Request.t ->
Status.t ->
Response.t Async.Deferred.terror_handler can be used to customize how the server deals with any unhandled exceptions. A default implementation is provided that will respond with a status code and an empty response body.
A user provided service that is invoked for every request/response cycle for a HTTP connection.
val run_inet :
?config:Config.t ->
Async.Tcp.Where_to_listen.inet ->
(Async.Socket.Address.Inet.t -> service) ->
Async.Tcp.Server.inetrun_inet ?config addr service runs a http server where each request will be forwarded to the user provided service.
val run :
?config:Config.t ->
('address, 'listening_on) Async.Tcp.Where_to_listen.t ->
('address -> service) ->
('address, 'listening_on) Async.Tcp.Server.t Async.Deferred.trun ?config addr service runs a http server where each request will be forwarded to the user provided service.