package shuttle_http

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

Install

Dune Dependency

Authors

Maintainers

Sources

shuttle_http-0.12.0.tbz
sha256=073651dfcbe88a29856ae9568583ecece3df659aa74470ca92671e388ccc9351
sha512=78a8f4517238a7332cf5211f250aa031a3f64fcdf3617c23f072183bbbd9535e295cdef9551d24e4451ef674e0ce6845296960f66ca9c28b81430f4cf0dda563

doc/shuttle_http/Shuttle_http/Server/index.html

Module Shuttle_http.ServerSource

module Logger : Async_log.Global.S
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 Ssl : sig ... end
Sourcemodule Config : sig ... end
Sourcetype 'addr t
Sourceval sexp_of_t : ('addr -> Sexplib0.Sexp.t) -> 'addr t -> Sexplib0.Sexp.t
Sourceval peer_addr : 'addr t -> 'addr
Sourceval is_ssl : 'addr t -> bool
Sourceval ssl_peer_certificate : 'addr t -> Async_ssl.Ssl.Certificate.t Core.Or_error.t option
Sourceval ssl_version : 'addr t -> Async_ssl.Ssl.Version.t option
Sourcetype 'addr service = 'addr t -> Request.t -> Response.t Async.Deferred.t

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.

OCaml

Innovation. Community. Security.