package ezjs_fetch

  1. Overview
  2. Docs
Bindings for Fetch

Install

Dune Dependency

Authors

Maintainers

Sources

0.3.tar.gz
md5=6cd4122c904099d8c61e3bb435ce3382
sha512=51a5e3ac727c04a34cb054f22774c11270817f3abb5248f6001a5ece24dc55b39e7b0d26489399e75cd77f1770434336fd778bea8d6e806905d770c39a1d7670

doc/ezjs_fetch/Ezjs_fetch/index.html

Module Ezjs_fetchSource

Sourcemodule Stream : sig ... end
Sourceval optdef : ('a -> 'b) -> 'a option -> 'b Ezjs_min.optdef
Sourceval to_listf : ('a -> 'b) -> 'a Ezjs_min.js_array Ezjs_min.t -> 'b list
Sourceclass type 'a next = object ... end
Sourceclass type 'a iterator = object ... end
Sourceclass type 'a array_from = object ... end
Sourceclass type headers = object ... end
Sourceclass type body = object ... end
Sourceclass type request_init = object ... end
Sourceclass type fetch_init = object ... end
Sourceclass type request = object ... end
Sourceclass type response_js = object ... end
Sourceclass type global_scope = object ... end
Sourceval global_scope : global_scope Ezjs_min.t
Sourceval make_headers : (string * string) list -> headers Js_of_ocaml.Js.t
Sourceval get_headers : headers Ezjs_min.t -> (string * string) list
Sourcetype request_body =
  1. | RBlob of Ezjs_min.File.blob Ezjs_min.t
  2. | RString of string
  3. | RBuffer of Ezjs_min.Typed_array.arrayBuffer Ezjs_min.t
  4. | RFormData of Js_of_ocaml.Form.formData Ezjs_min.t
  5. | RUrlParam of (string * string) list
Sourceval 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 Ezjs_min.optdef
Sourceval 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.t
Sourceval 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 Ezjs_min.t Ezjs_min.optdef
Sourceval 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 Ezjs_min.t promise
Sourcetype 'a response = {
  1. headers : (string * string) list;
  2. ok : bool;
  3. redirected : bool;
  4. status : int;
  5. status_text : string;
  6. typ : string;
  7. url : string;
  8. body_used : bool;
  9. body : 'a;
}
Sourcetype 'a body_translate = (('a, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) -> response_js Ezjs_min.t -> unit
Sourceval to_text : string body_translate
Sourceval to_stream : ('a -> 'b Ezjs_min.t -> ('a, string option) Ezjs_min.result) -> 'a -> 'a body_translate
Sourceval to_str_stream : ('a -> string -> ('a, string option) Ezjs_min.result) -> 'a -> 'a body_translate
Sourceval 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 -> 'a body_translate -> (('a response, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) -> unit
Sourceval fetch_request : request Ezjs_min.t -> 'a body_translate -> (('a response, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) -> unit
OCaml

Innovation. Community. Security.