Module Js_of_ocaml.Fetch
Fetch API.
Headers
class type headers = object ... endBuild a headers object from a list of (name, value) pairs.
Request
class type requestInit = object ... endInitializer for request (and fetch_with_init). All fields are optional; create an empty record with empty_request_init and populate the ones you need.
val empty_request_init : unit -> requestInit Js.tclass type request = object ... endval request : (Js.js_string Js.t -> request Js.t) Js.constrval request_with_init :
(Js.js_string Js.t -> requestInit Js.t -> request Js.t) Js.constrnew%js request_of_request_with_init r init builds a request using r as a template, overriding fields set in init.
Response
class type responseInit = object ... endval empty_response_init : unit -> responseInit Js.tclass type response = object ... endval response : (Js.Unsafe.any -> response Js.t) Js.constrval response_with_init :
(Js.Unsafe.any -> responseInit Js.t -> response Js.t) Js.constrfetch
val fetch : Js.js_string Js.t -> response Js.t Promise.tval fetch_with_init :
Js.js_string Js.t ->
requestInit Js.t ->
response Js.t Promise.tval is_supported : unit -> boolWhether the fetch global is available in the current environment.