package ezjs_fetch
Bindings for Fetch
Install
Dune Dependency
Authors
Maintainers
Sources
0.3.tar.gz
md5=6cd4122c904099d8c61e3bb435ce3382
sha512=51a5e3ac727c04a34cb054f22774c11270817f3abb5248f6001a5ece24dc55b39e7b0d26489399e75cd77f1770434336fd778bea8d6e806905d770c39a1d7670
doc/ezjs_fetch.lwt/Ezjs_fetch_lwt/index.html
Module Ezjs_fetch_lwt
Source
include module type of struct include Ezjs_fetch end
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 = Ezjs_fetch.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 = 'a Ezjs_fetch.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 to_stream :
('a -> 'b Ezjs_min.t -> ('a, string option) Ezjs_min.result) ->
'a ->
(('a, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) ->
response_js Ezjs_min.t ->
unit
Source
val to_str_stream :
('a -> string -> ('a, string option) Ezjs_min.result) ->
'a ->
(('a, Ezjs_min.error Ezjs_min.t) Ezjs_min.result -> unit) ->
response_js Ezjs_min.t ->
unit
Source
val (>>=?) :
('a, 'b) Ezjs_min_lwt.result Lwt.t ->
('a -> ('c, 'b) Ezjs_min_lwt.result Lwt.t) ->
('c, 'b) Ezjs_min_lwt.result Lwt.t
Source
val (>|=?) :
('a, 'b) Ezjs_min_lwt.result Lwt.t ->
('a -> 'c) ->
('c, 'b) Ezjs_min_lwt.result Lwt.t
Source
val catch :
'a Ezjs_min_lwt.Opt.t Ezjs_min_lwt.Promise.promise Ezjs_min_lwt.t ->
('a, Ezjs_min__.Js.Js_error.error_t) result Lwt.t
Source
type 'a body_translate =
response_js Ezjs_min_lwt.t ->
('a, Ezjs_min_lwt.error Ezjs_min_lwt.t) Ezjs_min_lwt.result Lwt.t
Source
val to_response :
'a body_translate ->
response_js Ezjs_min_lwt.t ->
('a response, Ezjs_min_lwt.error Ezjs_min_lwt.t) Ezjs_min_lwt.result Lwt.t
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__.Js.Js_error.error_t) Ezjs_min_lwt.result Lwt.t
Source
val fetch_request :
request Ezjs_min.t ->
'a body_translate ->
('a response, Ezjs_min__.Js.Js_error.error_t) Ezjs_min_lwt.result Lwt.t
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>