doc: harmonize section headers in docs

This commit is contained in:
Simon Cruanes 2019-11-25 21:06:27 -06:00
parent d1828fdcaa
commit 3e28be80ec

View file

@ -130,7 +130,7 @@ module Byte_stream : sig
@param buf a buffer to (re)use. Its content will be cleared. *) @param buf a buffer to (re)use. Its content will be cleared. *)
end end
(** {2 HTTP methods} *) (** {2 Methods} *)
module Meth : sig module Meth : sig
type t = [ type t = [
@ -149,7 +149,9 @@ module Meth : sig
val to_string : t -> string val to_string : t -> string
end end
(** {2 HTTP headers} *) (** {2 Headers}
Headers are metadata associated with a request or response. *)
module Headers : sig module Headers : sig
type t = (string * string) list type t = (string * string) list
@ -176,7 +178,9 @@ module Headers : sig
(** Pretty print the headers. *) (** Pretty print the headers. *)
end end
(** {2 HTTP requests} *) (** {2 Requests}
Requests are sent by a client, e.g. a web browser or cURL. *)
module Request : sig module Request : sig
type 'body t = { type 'body t = {
@ -224,7 +228,7 @@ module Request : sig
(** Read the whole body into a string. Potentially blocking. *) (** Read the whole body into a string. Potentially blocking. *)
end end
(** {2 Response codes} *) (** {2 Response Codes} *)
module Response_code : sig module Response_code : sig
type t = int type t = int
@ -243,7 +247,10 @@ module Response_code : sig
NOTE: this is not complete (yet). *) NOTE: this is not complete (yet). *)
end end
(** {2 Response} *) (** {2 Responses}
Responses are what a http server, such as {!Tiny_httpd}, send back to
the client to answer a {!Request.t}*)
module Response : sig module Response : sig
type body = [`String of string | `Stream of byte_stream] type body = [`String of string | `Stream of byte_stream]