diff --git a/dev/tiny_httpd/Tiny_httpd/index.html b/dev/tiny_httpd/Tiny_httpd/index.html index 7b794442..b123af18 100644 --- a/dev/tiny_httpd/Tiny_httpd/index.html +++ b/dev/tiny_httpd/Tiny_httpd/index.html @@ -76,7 +76,7 @@ echo: stage:[ `Encoding | `Stage of int ] -> t -> Middleware.t -> - unit

Add a middleware to every request/response pair.

Request handlers
val set_top_handler : t -> (byte_stream Request.t -> Response.t) -> unit

Setup a handler called by default.

This handler is called with any request not accepted by any handler installed via add_path_handler. If no top handler is installed, unhandled paths will return a 404 not found.

val add_route_handler : + unit

Add a middleware to every request/response pair.

Request handlers
val set_top_handler : t -> (byte_stream Request.t -> Response.t) -> unit

Setup a handler called by default.

This handler is called with any request not accepted by any handler installed via add_path_handler. If no top handler is installed, unhandled paths will return a 404 not found

This used to take a string Request.t but it now takes a byte_stream Request.t since NEXT_RELEASE . Use Request.read_body_full to read the body into a string if needed.

val add_route_handler : ?accept:(unit Request.t -> (unit, Response_code.t * string) Stdlib.result) -> ?middlewares:Middleware.t list -> ?meth:Meth.t -> diff --git a/dev/tiny_httpd/Tiny_httpd_server/index.html b/dev/tiny_httpd/Tiny_httpd_server/index.html index c04f48e6..fb78cf3c 100644 --- a/dev/tiny_httpd/Tiny_httpd_server/index.html +++ b/dev/tiny_httpd/Tiny_httpd_server/index.html @@ -26,7 +26,7 @@ stage:[ `Encoding | `Stage of int ] -> t -> Middleware.t -> - unit

Add a middleware to every request/response pair.

Request handlers

val set_top_handler : t -> (byte_stream Request.t -> Response.t) -> unit

Setup a handler called by default.

This handler is called with any request not accepted by any handler installed via add_path_handler. If no top handler is installed, unhandled paths will return a 404 not found.

val add_route_handler : + unit

Add a middleware to every request/response pair.

Request handlers

val set_top_handler : t -> (byte_stream Request.t -> Response.t) -> unit

Setup a handler called by default.

This handler is called with any request not accepted by any handler installed via add_path_handler. If no top handler is installed, unhandled paths will return a 404 not found

This used to take a string Request.t but it now takes a byte_stream Request.t since NEXT_RELEASE . Use Request.read_body_full to read the body into a string if needed.

val add_route_handler : ?accept:(unit Request.t -> (unit, Response_code.t * string) Stdlib.result) -> ?middlewares:Middleware.t list -> ?meth:Meth.t ->