package shuttle_http

  1. Overview
  2. Docs
type t

t Represents a HTTP 1.1 request.

val sexp_of_t : t -> Sexplib0.Sexp.t
val create : ?version:Version.t -> ?headers:Headers.t -> ?body:Body.t -> Meth.t -> string -> t
val meth : t -> Meth.t

meth returns the HTTP method of this request.

val path : t -> string

path returns the path component and query parameters of the request URI

val version : t -> Version.t

version returns the HTTP version number for the request.

val headers : t -> Headers.t

headers returns HTTP headers of this request.

val body : t -> Body.t

body returns the body payload of this request.

val with_body : t -> Body.t -> t

with_body returns a new request where every value is the same as the input request but the body is replaced with the function input.

val with_headers : t -> Headers.t -> t

with_headers returns a new request where every value is the same as the input request but headers are replaced with the function input.