`sig
type readyState = UNSENT | OPENED | HEADERS_RECEIVED | LOADING | DONE
class type xmlHttpRequest =
object ('a)
method _open :
Js.js_string Js.t -> Js.js_string Js.t -> bool Js.t -> unit Js.meth
method _open_full :
Js.js_string Js.t ->
Js.js_string Js.t ->
bool Js.t ->
Js.js_string Js.t Js.opt -> Js.js_string Js.t Js.opt -> unit Js.meth
method abort : unit Js.meth
method getAllResponseHeaders : Js.js_string Js.t Js.meth
method getResponseHeader :
Js.js_string Js.t -> Js.js_string Js.t Js.opt Js.meth
method onabort :
('a Js.t, 'a File.progressEvent Js.t) Dom.event_listener
Js.writeonly_prop
method onerror :
('a Js.t, 'a File.progressEvent Js.t) Dom.event_listener
Js.writeonly_prop
method onload :
('a Js.t, 'a File.progressEvent Js.t) Dom.event_listener
Js.writeonly_prop
method onloadend :
('a Js.t, 'a File.progressEvent Js.t) Dom.event_listener
Js.writeonly_prop
method onloadstart :
('a Js.t, 'a File.progressEvent Js.t) Dom.event_listener
Js.writeonly_prop
method onprogress :
('a Js.t, 'a File.progressEvent Js.t) Dom.event_listener
Js.writeonly_prop
method onreadystatechange :
(unit -> unit) Js.callback Js.writeonly_prop
method ontimeout :
('a Js.t, 'a File.progressEvent Js.t) Dom.event_listener
Js.writeonly_prop
method overrideMimeType : Js.js_string Js.t -> unit Js.meth
method readyState : XmlHttpRequest.readyState Js.readonly_prop
method responseText : Js.js_string Js.t Js.readonly_prop
method responseXML :
Dom.element Dom.document Js.t Js.opt Js.readonly_prop
method send : Js.js_string Js.t Js.opt -> unit Js.meth
method send_document : Dom.element Dom.document -> unit Js.meth
method send_formData : Form.formData Js.t -> unit Js.meth
method setRequestHeader :
Js.js_string Js.t -> Js.js_string Js.t -> unit Js.meth
method status : int Js.readonly_prop
method statusText : Js.js_string Js.t Js.readonly_prop
end
val create : unit -> XmlHttpRequest.xmlHttpRequest Js.t
module Event :
sig
type typ =
XmlHttpRequest.xmlHttpRequest File.progressEvent Js.t Dom.Event.typ
val readystatechange :
XmlHttpRequest.xmlHttpRequest Dom.event Js.t Dom.Event.typ
val loadstart : XmlHttpRequest.Event.typ
val progress : XmlHttpRequest.Event.typ
val abort : XmlHttpRequest.Event.typ
val error : XmlHttpRequest.Event.typ
val load : XmlHttpRequest.Event.typ
val timeout : XmlHttpRequest.Event.typ
val loadend : XmlHttpRequest.Event.typ
end
type http_frame = {
url : string;
code : int;
headers : string -> string option;
content : string;
content_xml : unit -> Dom.element Dom.document Js.t option;
}
exception Wrong_headers of (int * (string -> string option))
val perform_raw_url :
?headers:(string * string) list ->
?content_type:string ->
?post_args:(string * string) list ->
?get_args:(string * string) list ->
?form_arg:Form.form_contents ->
?check_headers:(int -> (string -> string option) -> bool) ->
?override_mime_type:string -> string -> XmlHttpRequest.http_frame Lwt.t
val perform :
?headers:(string * string) list ->
?content_type:string ->
?post_args:(string * string) list ->
?get_args:(string * string) list ->
?form_arg:Form.form_contents ->
?check_headers:(int -> (string -> string option) -> bool) ->
?override_mime_type:string -> Url.url -> XmlHttpRequest.http_frame Lwt.t
val get : string -> XmlHttpRequest.http_frame Lwt.t
end`