package github-hooks-unix

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Github_hooks_unix.ServerSource

include Cohttp_lwt.S.Server
module IO : sig ... end
type body = Cohttp_lwt__.Body.t
type conn = IO.conn * Cohttp__.Connection.t
type response = Http.Response.t * Cohttp_lwt__.Body.t
type response_action = [
  1. | `Expert of Http.Response.t * (IO.ic -> IO.oc -> unit IO.t)
  2. | `Response of response
]
type t
val make_response_action : ?conn_closed:(conn -> unit) -> callback:(conn -> Http.Request.t -> body -> response_action IO.t) -> unit -> t
val make_expert : ?conn_closed:(conn -> unit) -> callback: (conn -> Http.Request.t -> body -> (Http.Response.t * (IO.ic -> IO.oc -> unit IO.t)) IO.t) -> unit -> t
val make : ?conn_closed:(conn -> unit) -> callback:(conn -> Http.Request.t -> body -> response IO.t) -> unit -> t
val respond : ?headers:Http.Header.t -> status:Http.Status.t -> body:body -> unit -> response IO.t
val respond_string : ?headers:Http.Header.t -> status:Http.Status.t -> body:string -> unit -> response IO.t
val callback : t -> IO.conn -> IO.ic -> IO.oc -> unit IO.t
val resolve_local_file : docroot:string -> uri:Uri.t -> string
  • deprecated Please use Cohttp.Path.resolve_local_file.
val respond_error : ?headers:Http.Header.t -> ?status:Http.Status.t -> body:string -> unit -> (Http.Response.t * body) IO.t
val respond_redirect : ?headers:Http.Header.t -> uri:Uri.t -> unit -> (Http.Response.t * body) IO.t
val respond_need_auth : ?headers:Http.Header.t -> auth:Cohttp.Auth.challenge -> unit -> (Http.Response.t * body) IO.t
val respond_not_found : ?uri:Uri.t -> unit -> (Http.Response.t * body) IO.t
Sourceval create : mode -> t -> unit Lwt.t
OCaml

Innovation. Community. Security.