Module Fetch
val optdef : ('a -> 'b) -> 'a option -> 'b Js_of_ocaml.Js.optdefval to_listf : ('a -> 'b) -> 'a Js_of_ocaml.Js.js_array Js_of_ocaml.Js.t -> 'b list
class type 'a next = object ... endclass type 'a iterator = object ... endclass type 'a array_from = object ... endval array_from : 'a iterator Js_of_ocaml.Js.t -> 'a Js_of_ocaml.Js.js_array Js_of_ocaml.Js.t
class type headers = object ... endtype 'a promise= 'a Promise.promise Js_of_ocaml.Js.t
class type body = object ... endclass type request_init = object ... endclass type abort_signal = object ... endclass type fetch_init = object ... endclass type request = object ... endclass type response_js = object ... endclass type global_scope = object ... endval request_js : (Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t -> request_init Js_of_ocaml.Js.t Js_of_ocaml.Js.optdef -> request Js_of_ocaml.Js.t) Js_of_ocaml.Js.constrval header_js : headers Js_of_ocaml.Js.t Js_of_ocaml.Js.constrval global_scope : global_scope Js_of_ocaml.Js.t Stdlib.refval init_worker : unit -> unitval make_headers : (string * string) list -> headers Js_of_ocaml.Js.tval get_headers : headers Js_of_ocaml.Js.t -> (string * string) list
type request_body=
val request_init : ?cache:string -> ?credentials:string -> ?headers:(string * string) list -> ?integrity:string -> ?meth:string -> ?mode:string -> ?redirect:string -> ?referrer:string -> ?body:request_body -> unit -> 'a Js_of_ocaml.Js.optdefval request : ?cache:string -> ?credentials:string -> ?headers:(string * string) list -> ?integrity:string -> ?meth:string -> ?mode:string -> ?redirect:string -> ?referrer:string -> ?body:request_body -> string -> request Js_of_ocaml.Js.tval fetch_init : ?cache:string -> ?credentials:string -> ?headers:(string * string) list -> ?integrity:string -> ?meth:string -> ?mode:string -> ?redirect:string -> ?referrer:string -> ?body:request_body -> ?referrerPolicy:string -> ?keepalive:bool -> unit -> fetch_init Js_of_ocaml.Js.t Js_of_ocaml.Js.optdefval fetch_base : ?cache:string -> ?credentials:string -> ?headers:(string * string) list -> ?integrity:string -> ?meth:string -> ?mode:string -> ?redirect:string -> ?referrer:string -> ?body:request_body -> ?referrerPolicy:string -> ?keepalive:bool -> string -> response_js Js_of_ocaml.Js.t promiseval fetch_request_base : request Js_of_ocaml.Js.t -> response_js Js_of_ocaml.Js.t promise
type 'a response={headers : (string * string) list;ok : bool;redirected : bool;status : int;status_text : string;typ : string;url : string;body_used : bool;body : 'a;}
val (>>=?) : ('a, 'b) result Lwt.t -> ('a -> ('c, 'b) result Lwt.t) -> ('c, 'b) result Lwt.tval (>|=?) : ('a, 'b) result Lwt.t -> ('a -> 'c) -> ('c, 'b) result Lwt.tval to_lwt_str : ?msg:string -> 'a Promise_lwt.promise Js_min.t -> ('a, string) result Lwt.tval to_lwt_opt : ?msg:string -> ('a -> 'b) -> 'a Js_of_ocaml.Js.Opt.t Promise_lwt.promise Js_min.t -> ('b, string) result Lwt.tval to_array_buffer : < arrayBuffer : 'a Js_of_ocaml.Js.Opt.t Promise_lwt.promise Js_min.t Js_of_ocaml.Js.meth; .. > Js_of_ocaml.Js.t -> ('a, string) result Lwt.tval to_blob : < blob : 'a Js_of_ocaml.Js.Opt.t Promise_lwt.promise Js_min.t Js_of_ocaml.Js.meth; .. > Js_of_ocaml.Js.t -> ('a, string) result Lwt.tval to_form_data : < formData : 'a Js_of_ocaml.Js.Opt.t Promise_lwt.promise Js_min.t Js_of_ocaml.Js.meth; .. > Js_of_ocaml.Js.t -> ('a, string) result Lwt.tval to_js : < json : 'a Js_of_ocaml__Js.t Js_of_ocaml.Js.Opt.t Promise_lwt.promise Js_min.t Js_of_ocaml.Js.meth; .. > Js_of_ocaml.Js.t -> ('b Js_of_ocaml__Js.t, string) result Lwt.tval to_text : < text : Js_of_ocaml.Js.js_string Js_of_ocaml.Js.t Js_of_ocaml.Js.Opt.t Promise_lwt.promise Js_min.t Js_of_ocaml.Js.meth; .. > Js_of_ocaml.Js.t -> (string, string) result Lwt.tval to_response : (response_js Js_of_ocaml.Js.t -> ('a, 'b) result Lwt.t) -> response_js Js_of_ocaml.Js.t -> ('a response, 'b) result Lwt.tval fetch : ?cache:string -> ?credentials:string -> ?headers:(string * string) list -> ?integrity:string -> ?meth:string -> ?mode:string -> ?redirect:string -> ?referrer:string -> ?body:request_body -> ?referrerPolicy:string -> ?keepalive:bool -> string -> (response_js Js_of_ocaml.Js.t -> ('a, string) result Lwt.t) -> ('a response, string) result Lwt.tval fetch_request : request Js_of_ocaml.Js.t -> (response_js Js_of_ocaml.Js.t -> ('a, string) result Lwt.t) -> ('a response, string) result Lwt.t