From aa5474167f048fcc91764296efd147ef9e30dbe3 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Tue, 20 Jan 2026 20:53:31 -0500 Subject: [PATCH] prepare for 0.3 --- CHANGELOG.md | 23 +++++++++++++++++------ dune-project | 2 +- ezcurl-lwt.opam | 2 +- ezcurl.opam | 2 +- src/core/ezcurl_core.ml | 4 ++-- src/core/ezcurl_core.mli | 18 +++++++++--------- 6 files changed, 31 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42eccaf..6173f47 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,27 +1,38 @@ -## 0.2.4 + +# 0.3 + +- Provide seek function when uploading from string +- make `CURLOPT_NOSIGNAL=false` the default; simplify +- Expose underlying no signal in a global setting +- implement `http_stream` +- feat: add `Ezcurl.Cookies` module, get/set/transfer them + +- breaking: wrap Curl.t in record + +# 0.2.4 - fix: global initialization logic is now hidden behind a mutex * depend on `thread` -## 0.2.3 +# 0.2.3 - fix: workaround servers which do not understand "Expect" header - fix: correctly set size of payload for POST - make sure to setup 'PUT" correctly - allow POST with non-form data -## 0.2.2 +# 0.2.2 - fix: do not reset client if passed as argument -## 0.2.1 +# 0.2.1 - fix setting of headers -## 0.2 +# 0.2 - add default user agent -## 0.1 +# 0.1 - initial release diff --git a/dune-project b/dune-project index f9b0352..edc653d 100644 --- a/dune-project +++ b/dune-project @@ -2,7 +2,7 @@ (name ezcurl) -(version 0.2.4) +(version 0.3) (generate_opam_files true) diff --git a/ezcurl-lwt.opam b/ezcurl-lwt.opam index 47558dc..bc323b3 100644 --- a/ezcurl-lwt.opam +++ b/ezcurl-lwt.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.2.4" +version: "0.3" synopsis: "Friendly wrapper around OCurl, Lwt version" maintainer: ["simon.cruanes.2007@m4x.org"] authors: ["Simon Cruanes"] diff --git a/ezcurl.opam b/ezcurl.opam index 666ea8b..6dff751 100644 --- a/ezcurl.opam +++ b/ezcurl.opam @@ -1,6 +1,6 @@ # This file is generated by dune, edit dune-project instead opam-version: "2.0" -version: "0.2.4" +version: "0.3" synopsis: "Friendly wrapper around OCurl" maintainer: ["simon.cruanes.2007@m4x.org"] authors: ["Simon Cruanes"] diff --git a/src/core/ezcurl_core.ml b/src/core/ezcurl_core.ml index aff44d0..c19d75c 100644 --- a/src/core/ezcurl_core.ml +++ b/src/core/ezcurl_core.ml @@ -261,7 +261,7 @@ module type S = sig @param headers headers of the query *) (** Push-stream of bytes - @since NEXT_RELEASE *) + @since 0.3 *) class type input_stream = object method on_close : unit -> unit method on_input : bytes -> int -> int -> unit @@ -280,7 +280,7 @@ module type S = sig unit -> (unit response, Curl.curlCode * string) result io (** HTTP call via cURL, with a streaming response body. - @since NEXT_RELEASE *) + @since 0.3 *) val get : ?tries:int -> diff --git a/src/core/ezcurl_core.mli b/src/core/ezcurl_core.mli index 8d2ac92..da903f6 100644 --- a/src/core/ezcurl_core.mli +++ b/src/core/ezcurl_core.mli @@ -17,7 +17,7 @@ end type t = private { curl: Curl.t } [@@unboxed] (** A client, i.e. a cURL instance. The wrapping record has been present since - NEXT_RELEASE *) + 0.3 *) val make : ?set_opts:(Curl.t -> unit) -> @@ -29,10 +29,10 @@ val make : @param set_opts called before returning the client, to set options @param cookiejar_file if provided, tell curl to use the given file path to store/load cookies - (since NEXT_RELEASE) + (since 0.3) @param enable_session_cookies if provided, enable cookie handling in curl so it store/load cookies - (since NEXT_RELEASE) *) + (since 0.3) *) val delete : t -> unit (** Delete the client. It cannot be used anymore. *) @@ -43,21 +43,21 @@ val with_client : ?set_opts:(Curl.t -> unit) -> (t -> 'a) -> 'a val set_no_signal : bool -> unit (** Set no_signal default value for each new client instance. Default is [true]. See [CURLOPT_NOSIGNAL]. - @since NEXT_RELEASE *) + @since 0.3 *) (** Cookie handling. - @since NEXT_RELEASE *) + @since 0.3 *) module Cookies : sig val flush_cookiejar : t -> unit (** If [cookiejar_file] was provided in {!make}, this flushes the current set of cookies to the provided file. - @since NEXT_RELEASE *) + @since 0.3 *) val reload_cookiejar : t -> unit (** If [cookiejar_file] was provided in {!make}, this reloads cookies from the provided file. - @since NEXT_RELEASE *) + @since 0.3 *) val get_cookies : t -> string list (** Get cookie list (in netscape format) *) @@ -164,7 +164,7 @@ module type S = sig @param headers headers of the query *) (** Push-based stream of bytes - @since NEXT_RELEASE *) + @since 0.3 *) class type input_stream = object method on_close : unit -> unit method on_input : bytes -> int -> int -> unit @@ -185,7 +185,7 @@ module type S = sig (** HTTP call via cURL, with a streaming response body. The body is given to [write_into] by chunks, then [write_into#on_close ()] is called and the response is returned. - @since NEXT_RELEASE *) + @since 0.3 *) val get : ?tries:int ->