module Http_daemon:Main OCaml HTTP module. Here you can find two set of functions:sig
..end
val send_CRLF : Pervasives.out_channel -> unit
val send_status_line : ?version:Http_types.version ->
code:Http_types.status_code -> Pervasives.out_channel -> unit
val send_basic_headers : ?version:Http_types.version ->
code:Http_types.status_code -> Pervasives.out_channel -> unit
val send_header : header:string -> value:string -> Pervasives.out_channel -> unit
val send_headers : headers:(string * string) list -> Pervasives.out_channel -> unit
val send_file : src:Http_types.file_source -> Pervasives.out_channel -> unit
val respond : ?body:string ->
?headers:(string * string) list ->
?version:Http_types.version ->
?code:Http_types.status_code -> Pervasives.out_channel -> unit
val respond_not_found : url:string -> ?version:Http_types.version -> Pervasives.out_channel -> unit
val respond_forbidden : url:string -> ?version:Http_types.version -> Pervasives.out_channel -> unit
val respond_redirect : location:string ->
?body:string ->
?version:Http_types.version ->
?code:Http_types.status_code -> Pervasives.out_channel -> unit
val respond_unauthorized : ?version:Http_types.version ->
?realm:string -> Pervasives.out_channel -> unit
val respond_error : ?body:string ->
?version:Http_types.version ->
?code:Http_types.status_code -> Pervasives.out_channel -> unit
val respond_file : fname:string -> ?version:Http_types.version -> Pervasives.out_channel -> unit
val respond_with : Http_types.response -> Pervasives.out_channel -> unit
val main : Http_types.daemon_spec -> unit
val default_spec : Http_types.daemon_spec
val daemon_spec : ?address:string ->
?auth:(string * Http_types.auth_info) option ->
?callback:(Http_types.request -> Pervasives.out_channel -> unit) ->
?mode:Http_types.daemon_mode ->
?port:int ->
?root_dir:string option ->
?exn_handler:(exn -> Pervasives.out_channel -> unit) option ->
?timeout:int option -> unit -> Http_types.daemon_spec
val start : ?addr:string ->
?port:int ->
?timeout:int option ->
?mode:Http_types.daemon_mode ->
?root:string ->
(string -> (string * string) list -> Pervasives.out_channel -> unit) -> unit
see Http_types.daemon_spec
for a detailed description of parameters
starts an HTTP daemon (deprecated function)
addr
: like the "address" field of Http_types.daemon_spec, defaults to
the wildcard address "0.0.0.0"port
: like the "port" field of Http_types.daemon_spec, defaults to 80timeout
: like the "timeout" field of Http_types.daemon_spec, defaults
to Some 300mode
: like the "mode" field of Http_types.daemon_spec, defaults to
`Forkroot
: like the "root_dir" field of Http_types.daemon_spec, defaults to
Noneval start' : ?addr:string ->
?port:int ->
?timeout:int option ->
?mode:Http_types.daemon_mode ->
?root:string ->
(Http_types.request -> Pervasives.out_channel -> unit) -> unit
parameters as per Http_daemon.start
except for the callback, in this case
it behaves as the "callback" field of Http_types.daemon_spec
starts an HTTP daemon (deprecated function)
class daemon :?addr:string -> ?port:int -> unit ->
Http_types.daemon
module Trivial:sig
..end