package ezcurl

  1. Overview
  2. Docs
Friendly wrapper around OCurl

Install

Dune Dependency

Authors

Maintainers

Sources

v0.2.2.tar.gz
md5=75eafead85b6fe5ba2652a4eb580a9a9
sha512=dde8178f2c06adb047b8fcecc8c14bc2c5f9f51748c725c2917f7f5d3faeff385303123eb0213c55d7f2e29dad9e8c88da1b0460fa643cfba958fbe531c097fd

doc/ezcurl/Ezcurl/index.html

Module EzcurlSource

Synchronous API

include module type of struct include Ezcurl_core end

Core signatures and implementation

Sourcemodule Config = Ezcurl_core.Config
Sourcetype t = Curl.t
Sourceval make : ?set_opts:(t -> unit) -> unit -> t
Sourceval delete : t -> unit
Sourceval with_client : ?set_opts:(t -> unit) -> (t -> 'a) -> 'a

Make a temporary client, call the function with it, then cleanup

Sourcetype response_info = Ezcurl_core.response_info = {
  1. ri_response_time : float;
  2. ri_redirect_count : int;
}
Sourceval pp_response_info : Format.formatter -> response_info -> unit
Sourceval string_of_response_info : response_info -> string
Sourcetype response = Ezcurl_core.response = {
  1. code : int;
  2. headers : (string * string) list;
  3. body : string;
  4. info : response_info;
}
Sourceval pp_response : Format.formatter -> response -> unit
Sourceval string_of_response : response -> string
Sourcetype meth = Ezcurl_core.meth =
  1. | GET
  2. | POST of Curl.curlHTTPPost list
  3. | PUT
  4. | DELETE
  5. | HEAD
  6. | CONNECT
  7. | OPTIONS
  8. | TRACE
  9. | PATCH

The HTTP method to use

Sourceval pp_meth : Format.formatter -> meth -> unit
Sourceval string_of_meth : meth -> string
Sourcemodule type IO = Ezcurl_core.IO
Sourcemodule type S = Ezcurl_core.S
include sig ... end
Sourcetype 'a io = 'a
Sourceval http : ?tries:int -> ?client:Ezcurl_core.t -> ?config:Ezcurl_core.Config.t -> ?range:string -> ?content:[ `String of string | `Write of bytes -> int -> int ] -> ?headers:(string * string) list -> url:string -> meth:Ezcurl_core.meth -> unit -> (Ezcurl_core.response, Curl.curlCode * string) result io
Sourceval get : ?tries:int -> ?client:Ezcurl_core.t -> ?config:Ezcurl_core.Config.t -> ?range:string -> ?headers:(string * string) list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) result io
Sourceval put : ?tries:int -> ?client:Ezcurl_core.t -> ?config:Ezcurl_core.Config.t -> ?headers:(string * string) list -> url:string -> content:[ `String of string | `Write of bytes -> int -> int ] -> unit -> (Ezcurl_core.response, Curl.curlCode * string) result io
Sourceval post : ?tries:int -> ?client:Ezcurl_core.t -> ?config:Ezcurl_core.Config.t -> ?headers:(string * string) list -> ?content:[ `String of string | `Write of bytes -> int -> int ] -> params:Curl.curlHTTPPost list -> url:string -> unit -> (Ezcurl_core.response, Curl.curlCode * string) result io
OCaml

Innovation. Community. Security.

On This Page
  1. Synchronous API