Module Fetch.Request

Resource requests.


module Cache : sig ... end

Request cache mode enum.

module Credentials : sig ... end

Request credentials mode enum.

module Destination : sig ... end

Request destination enum.

module Mode : sig ... end

Request mode enum.

module Redirect : sig ... end

Request redirect enum.


type init

The type for request initialisation objects.

val init : ?body:Body.init -> ?cache:Cache.t -> ?credentials:Credentials.t -> ?headers:Headers.t -> ?integrity:Jstr.t -> ?keepalive:bool -> ?method':Jstr.t -> ?mode:Mode.t -> ?redirect:Redirect.t -> ?referrer:Jstr.t -> ?referrer_policy:Jstr.t -> ?signal:Brr.Abort.Signal.t -> unit -> init

init () is a request initialisation object with given parameters.

type t

The type for Request objects.

val v : ?init:init -> Jstr.t -> t

v ~init uri is a request on uri with parameters init.

val of_request : ?init:init -> t -> t

of_request ~init r is a copy of r updated by init.

val as_body : t -> Body.t

as_body r is the Body interface of r.


val cache : t -> Cache.t

cache r is the cache behaviour of r.

val credentials : t -> Credentials.t

credentials r are the credentials of r.

val destination : t -> Destination.t

destination r is the destination of r.

val headers : t -> Headers.t

headers r are the headers of r.

val integrity : t -> Jstr.t

integrity r is the integrity of r.

val is_history_navigation : t -> bool

is_history_navigation r is the isHistoryNavigation property of r.

val is_reload_navigation : t -> bool

is_reload_navigation r is the isReloadNavigation property of r.

val keepalive : t -> bool

keepalive r is the keepalive behaviour of r.

val method' : t -> Jstr.t

method' r is the method of r.

val mode : t -> Mode.t

mode r is the mode of r.

val redirect : t -> Redirect.t

redirect r is the redirect behaviour of r.

val referrer : t -> Jstr.t

referrer r is the referrer of r.

val referrer_policy : t -> Jstr.t

referrer_policy r is the referrer policy of r.

val signal : t -> Brr.Abort.Signal.t option

signal r is the abort signal of r.

val url : t -> Jstr.t

url r is the url of r.