From cbc69ea178e53c00ff906783b891b170d0952fb2 Mon Sep 17 00:00:00 2001 From: c-cube Date: Tue, 8 Aug 2023 20:44:30 +0000 Subject: [PATCH] deploy: 7365dfcdd5f9104c195b60b5e62b7db4e7c54d94 --- dev/tiny_httpd/Tiny_httpd/index.html | 2 +- dev/tiny_httpd/Tiny_httpd_server/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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.

  • parameter stage

    specify when middleware applies. Encoding comes first (outermost layer), then stages in increasing order.

  • raises Invalid_argument

    if stage is `Stage n where n < 1

  • since 0.11
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.

  • parameter stage

    specify when middleware applies. Encoding comes first (outermost layer), then stages in increasing order.

  • raises Invalid_argument

    if stage is `Stage n where n < 1

  • since 0.11

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.

  • parameter stage

    specify when middleware applies. Encoding comes first (outermost layer), then stages in increasing order.

  • raises Invalid_argument

    if stage is `Stage n where n < 1

  • since 0.11

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 ->