package jerboa

  1. Overview
  2. Docs

Jerboa.request module contains the type definition of the Request record and a constructor for the Response.

type t = {
  1. status_code : Cohttp.Code.status_code;
  2. body : string;
  3. headers : Header.t option;
}

Response.t is a record, which will be used as the base response type.

val create : ?headers:Header.t -> int -> string -> t

Response.create status_code body creates a reponse based on the provided arguments:

  • status_code: http code to be used for the response
  • body: http body of the response
OCaml

Innovation. Community. Security.