package ezjs_fetch
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_fetch
Source
Source
val request_js :
(Ezjs_min.js_string Ezjs_min.t ->
request_init Ezjs_min.t Ezjs_min.optdef ->
request Ezjs_min.t)
Ezjs_min.constr
Source
type request_body =
| RBlob of Ezjs_min.File.blob Ezjs_min.t
| RString of string
| RBuffer of Ezjs_min.Typed_array.arrayBuffer Ezjs_min.t
| RFormData of Js_of_ocaml.Form.formData Ezjs_min.t
| RUrlParam of (string * string) list
Source
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 Ezjs_min.optdef
Source
val 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
Source
val 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
Source
val 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
Source
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;
}
Source
val catch :
(('a, Js_of_ocaml.Js.Js_error.error_t) Ezjs_min.result -> unit) ->
'a Ezjs_min.Opt.t Ezjs_min.Promise.promise Js_of_ocaml.Js.t ->
unit
Source
type 'a body_translate =
(('a, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) ->
response_js Ezjs_min.t ->
unit
Source
val to_stream :
('a -> 'b Ezjs_min.t -> ('a, string option) Ezjs_min.result) ->
'a ->
'a body_translate
Source
val to_str_stream :
('a -> string -> ('a, string option) Ezjs_min.result) ->
'a ->
'a body_translate
Source
val to_response :
'a body_translate ->
(('a response, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) ->
response_js Ezjs_min.t ->
unit
Source
val 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
Source
val fetch_request :
request Ezjs_min.t ->
'a body_translate ->
(('a response, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) ->
unit
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>