package activitypub

  1. Overview
  2. Docs
include module type of struct include Server_core end
module IO = Server_core.IO
type response_action = [
  1. | `Expert of Cohttp.Response.t * (IO.ic -> IO.oc -> unit Lwt.t)
  2. | `Response of Cohttp.Response.t * Cohttp_lwt.Body.t
]
type t
val make_response_action : ?conn_closed:(conn -> unit) -> callback: (conn -> Cohttp.Request.t -> Cohttp_lwt.Body.t -> response_action Lwt.t) -> unit -> t
val make_expert : ?conn_closed:(conn -> unit) -> callback: (conn -> Cohttp.Request.t -> Cohttp_lwt.Body.t -> (Cohttp.Response.t * (IO.ic -> IO.oc -> unit Lwt.t)) Lwt.t) -> unit -> t
val make : ?conn_closed:(conn -> unit) -> callback: (conn -> Cohttp.Request.t -> Cohttp_lwt.Body.t -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t) -> unit -> t
val resolve_local_file : docroot:string -> uri:Uri.t -> string
val respond : ?headers:Cohttp.Header.t -> ?flush:bool -> status:Cohttp.Code.status_code -> body:Cohttp_lwt.Body.t -> unit -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_string : ?flush:bool -> ?headers:Cohttp.Header.t -> status:Cohttp.Code.status_code -> body:string -> unit -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_error : ?headers:Cohttp.Header.t -> ?status:Cohttp.Code.status_code -> body:string -> unit -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_redirect : ?headers:Cohttp.Header.t -> uri:Uri.t -> unit -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_need_auth : ?headers:Cohttp.Header.t -> auth:Cohttp.Auth.challenge -> unit -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val respond_not_found : ?uri:Uri.t -> unit -> (Cohttp.Response.t * Cohttp_lwt.Body.t) Lwt.t
val callback : t -> IO.conn -> IO.ic -> IO.oc -> unit Lwt.t
val init' : ?backlog:int -> ?stop:unit Lwt.t -> ?timeout:int -> Tls.Config.server -> Unix.sockaddr -> (Tls_lwt.Unix.t -> Lwt_io.input Lwt_io.channel -> Lwt_io.output Lwt_io.channel -> unit Lwt.t) -> unit Lwt.t
val init : ?backlog:int -> certfile:Lwt_io.file_name -> keyfile:Lwt_io.file_name -> ?stop:unit Lwt.t -> ?timeout:int -> Unix.sockaddr -> (Tls_lwt.Unix.t -> Lwt_io.input Lwt_io.channel -> Lwt_io.output Lwt_io.channel -> unit Lwt.t) -> unit Lwt.t
val sockaddr_on_tcp_port : Unix.sockaddr option -> int -> Unix.sockaddr * Ipaddr.t
val create : ?timeout:int -> ?stop:unit Lwt.t -> ?on_exn:'a -> ?sockaddr:Unix.sockaddr -> ?port:int -> Tls.Config.server -> t -> unit Lwt.t
OCaml

Innovation. Community. Security.