package git-mirage

  1. Overview
  2. Docs
type body

The type for request bodies.

val body : req -> body
val meth : req -> HTTP.meth
val uri : req -> uri
val headers : req -> HTTP.headers

headers r is r's information. Initially empty it can be used be services and layers to store and share data.

val with_headers : req -> HTTP.headers -> req

with_headers req hs is req with headers hs.

val with_path : req -> HTTP.path -> req

with_path req p is req with path p.

val with_body : req -> body -> req

with_body req body is req with body body.

val v : ?version:HTTP.version -> HTTP.meth -> path:HTTP.path -> ?query:(string * string list) list -> HTTP.headers -> body -> req

v meth ~path headers body is an HTTP request with the given components. query defaults to None.

OCaml

Innovation. Community. Security.