package shuttle_http

  1. Overview
  2. Docs
Async library for HTTP/1.1 servers and clients

Install

dune-project
 Dependency

Authors

Maintainers

Sources

shuttle-0.9.0.tbz
sha256=fd61626c46dcbd63449746b55e1b0821119e5215c6b32330f9671fbb306812ef
sha512=f06946e9271acd8df613385f7b94facb3d807b031c7eb21fac30886db0f45d8615b6eb71132455008b746513de3590d77890518e0c1a2672f1434cd9c1d97f67

doc/shuttle_http/Shuttle_http/Server/index.html

Module Shuttle_http.ServerSource

Sourcetype error_handler = ?exn:exn -> ?request:Request.t -> Status.t -> Response.t Async.Deferred.t

error_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.

Sourcemodule Config : sig ... end

A user provided service that is invoked for every request/response cycle for a HTTP connection.

Sourceval run_inet : ?config:Config.t -> Async.Tcp.Where_to_listen.inet -> (Async.Socket.Address.Inet.t -> service) -> Async.Tcp.Server.inet

run_inet ?config addr service runs a http server where each request will be forwarded to the user provided service.

Sourceval run : ?config:Config.t -> ('address, 'listening_on) Async.Tcp.Where_to_listen.t -> ('address -> service) -> ('address, 'listening_on) Async.Tcp.Server.t Async.Deferred.t

run ?config addr service runs a http server where each request will be forwarded to the user provided service.