package piaf

  1. Overview
  2. Docs
module Config : sig ... end
module Service : sig ... end
module Middleware : sig ... end
module Handler : sig ... end
type 'ctx ctx = 'ctx Handler.ctx = {
  1. ctx : 'ctx;
  2. request : Request.t;
}
module Error_response : sig ... end
type error_handler = Eio.Net.Sockaddr.stream -> ?request:Request.t -> respond:(headers:Headers.t -> Body.t -> Error_response.t) -> Error.server -> Error_response.t
type t
val create : ?error_handler:error_handler -> config:Config.t -> Request_info.t Handler.t -> t
module Command : sig ... end
val http_connection_handler : t -> Command.connection_handler

connection_handler server returns an HTTP/1.1 connection handler suitable to be passed to e.g. Eio.Net.accept_fork. It is generally recommended to use the Command module instead.

connection_handler server returns an HTTPS connection handler suitable to be passed to e.g. Eio.Net.accept_fork, which can speak both HTTP/1 and HTTP/2, according to its configuration. It is generally recommended to use the Command module instead.

OCaml

Innovation. Community. Security.