diff --git a/tiny_httpd/Tiny_httpd_core/Headers/index.html b/tiny_httpd/Tiny_httpd_core/Headers/index.html index 3f082d42..ea1f0a70 100644 --- a/tiny_httpd/Tiny_httpd_core/Headers/index.html +++ b/tiny_httpd/Tiny_httpd_core/Headers/index.html @@ -1,2 +1,2 @@ -Headers (tiny_httpd.Tiny_httpd_core.Headers)

Module Tiny_httpd_core.Headers

Headers

Headers are metadata associated with a request or response.

type t = (string * string) list

The header files of a request or response.

Neither the key nor the value can contain '\r' or '\n'. See https://tools.ietf.org/html/rfc7230#section-3.2

val empty : t

Empty list of headers.

  • since 0.5
val get : ?f:(string -> string) -> string -> t -> string option

get k headers looks for the header field with key k.

  • parameter f

    if provided, will transform the value before it is returned.

val get_exn : ?f:(string -> string) -> string -> t -> string
  • raises Not_found
val set : string -> string -> t -> t

set k v headers sets the key k to value v. It erases any previous entry for k

val remove : string -> t -> t

Remove the key from the headers, if present.

val contains : string -> t -> bool

Is there a header with the given key?

val pp : Stdlib.Format.formatter -> t -> unit

Pretty print the headers.

val parse_ : buf:Buf.t -> IO.Input.t -> t

/

val parse_line_ : string -> (string * string, string) result

/

+Headers (tiny_httpd.Tiny_httpd_core.Headers)

Module Tiny_httpd_core.Headers

Headers

Headers are metadata associated with a request or response.

type t = (string * string) list

The header files of a request or response.

Neither the key nor the value can contain '\r' or '\n'. See https://tools.ietf.org/html/rfc7230#section-3.2

val empty : t

Empty list of headers.

  • since 0.5
val get : ?f:(string -> string) -> string -> t -> string option

get k headers looks for the header field with key k.

  • parameter f

    if provided, will transform the value before it is returned.

val get_exn : ?f:(string -> string) -> string -> t -> string
  • raises Not_found
val set : string -> string -> t -> t

set k v headers sets the key k to value v. It erases any previous entry for k

val remove : string -> t -> t

Remove the key from the headers, if present.

val contains : string -> t -> bool

Is there a header with the given key?

val pp : Stdlib.Format.formatter -> t -> unit

Pretty print the headers.

/

val parse_ : buf:Buf.t -> IO.Input.t -> t
val parse_line_ : string -> (string * string, string) result

/

diff --git a/tiny_httpd/Tiny_httpd_core/Pool/Raw/index.html b/tiny_httpd/Tiny_httpd_core/Pool/Raw/index.html new file mode 100644 index 00000000..189aeb0b --- /dev/null +++ b/tiny_httpd/Tiny_httpd_core/Pool/Raw/index.html @@ -0,0 +1,2 @@ + +Raw (tiny_httpd.Tiny_httpd_core.Pool.Raw)

Module Pool.Raw

Low level control over the pool. This is easier to get wrong (e.g. releasing the same resource twice) so use with caution.

val acquire : 'a t -> 'a
val release : 'a t -> 'a -> unit
diff --git a/tiny_httpd/Tiny_httpd_core/Pool/index.html b/tiny_httpd/Tiny_httpd_core/Pool/index.html index 388a1330..94186063 100644 --- a/tiny_httpd/Tiny_httpd_core/Pool/index.html +++ b/tiny_httpd/Tiny_httpd_core/Pool/index.html @@ -4,4 +4,4 @@ mk_item:(unit -> 'a) -> ?max_size:int -> unit -> - 'a t

Create a new pool.

val with_resource : 'a t -> ('a -> 'b) -> 'b

with_resource pool f runs f x with x a resource; when f fails or returns, x is returned to the pool for future reuse.

+ 'a t

Create a new pool.

val with_resource : 'a t -> ('a -> 'b) -> 'b

with_resource pool f runs f x with x a resource; when f fails or returns, x is returned to the pool for future reuse.

module Raw : sig ... end

Low level control over the pool. This is easier to get wrong (e.g. releasing the same resource twice) so use with caution.