Up

module Cohttp_lwt_xhr

: sig

HTTP client for JavaScript using XMLHttpRequest.

#
module type Params = sig

Configuration parameters for the XmlHttpRequest engines

#
val chunked_response : bool

Should the response body data be chunked?

#
val chunk_size : int

Size of chunks

#
val convert_body_string : Js.js_string Js.t -> string

JavaScript string to OCaml conversion. Js.to_bytestring or Js.to_string

end
#
module Make_client_async : functor (P : Params) -> Cohttp_lwt.Client with module IO = String_io_lwt

Build an asynchronous engine with chunked/unchucked response data treated as raw bytes or UTF

#
module Make_client_sync : functor (P : Params) -> Cohttp_lwt.Client with module IO = String_io_lwt

Build a synchronous engine with chunked/unchucked response data treated as raw bytes or UTF

#
module Client : Cohttp_lwt.Client with module IO = String_io_lwt

The Client module implements an HTTP client interface using asynchronous XmlHttpRequests. The response body is returned in chucked form with 128Kb / chunk. Body data is treated as raw bytes

#
module Client_sync : Cohttp_lwt.Client with module IO = String_io_lwt

The Client_sync module implements an HTTP client interface using synchronous XmlHttpRequests. The response is not chunked and treated as raw bytes.

end