Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
0.15.0 (2014-12-24):
* Change `Cohttp_lwt_body.map` to use a non-labelled type to fit the Lwt
style better (#200).
* Remove use of deprecated `Lwt_unix.run` and replace it with `Lwt_main.run`.
Should be no observable external change (#217).
* Improve ocamldoc of `Cohttp.S` signature.

0.14.0 (2014-12-18):

Compatibility breaking interface changes:
Expand Down
2 changes: 1 addition & 1 deletion _oasis
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
OASISFormat: 0.3
Name: cohttp
Version: 0.14.0
Version: 0.15.0
Synopsis: HTTP library for Lwt, Async, JavaScript and Mirage
Authors: Anil Madhavapeddy, Stefano Zacchiroli, David Sheets, Thomas Gazagnaire, David Scott, Rudi Grinberg, Andy Ray
License: ISC
Expand Down
12 changes: 6 additions & 6 deletions lib/META
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# OASIS_START
# DO NOT EDIT (digest: 83110b7d757d775576f7f656771d933c)
version = "0.14.0"
# DO NOT EDIT (digest: 58f3ba980c68f36d754812ac1d1ae41c)
version = "0.15.0"
description = "HTTP library for Lwt, Async, JavaScript and Mirage"
requires =
"re.emacs stringext uri uri.services fieldslib sexplib bytes base64"
Expand All @@ -10,7 +10,7 @@ archive(native) = "cohttp.cmxa"
archive(native, plugin) = "cohttp.cmxs"
exists_if = "cohttp.cma"
package "lwt-core" (
version = "0.14.0"
version = "0.15.0"
description = "HTTP library for Lwt, Async, JavaScript and Mirage"
requires = "lwt uri cohttp"
archive(byte) = "cohttp_lwt.cma"
Expand All @@ -21,7 +21,7 @@ package "lwt-core" (
)

package "lwt" (
version = "0.14.0"
version = "0.15.0"
description = "HTTP library for Lwt, Async, JavaScript and Mirage"
requires = "cohttp.lwt-core unix lwt.unix conduit.lwt-unix"
archive(byte) = "cohttp_lwt_unix.cma"
Expand All @@ -32,7 +32,7 @@ package "lwt" (
)

package "js" (
version = "0.14.0"
version = "0.15.0"
description = "HTTP library for Lwt, Async, JavaScript and Mirage"
requires = "cohttp.lwt-core js_of_ocaml"
archive(byte) = "cohttp_lwt_xhr.cma"
Expand All @@ -43,7 +43,7 @@ package "js" (
)

package "async" (
version = "0.14.0"
version = "0.15.0"
description = "HTTP library for Lwt, Async, JavaScript and Mirage"
requires = "uri cohttp threads async conduit.async"
archive(byte) = "cohttp_async.cma"
Expand Down
42 changes: 41 additions & 1 deletion lib/s.mli
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,61 @@
*
*)

(** Module type signatures for Cohttp components *)

(** The [IO] module defines the blocking interface for reading
and writing to Cohttp streams *)
module type IO = sig

(** ['a t] represents a blocking monad state *)
type +'a t

(** [a >>= b] will pass the result of [a] to the
[b] function. This is a monadic [bind]. *)
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

(** [return a] will construct a constant IO value. *)
val return : 'a -> 'a t

(** [ic] represents an input channel *)
type ic

(** [oc] represents an output channel *)
type oc

(** [conn] represents the underlying network flow *)
type conn

(** [iter f l] will perform a blocking iteration using
[f] over the [l] list. The result is determined
after all the iterating threads have completed in
serial. *)
val iter : ('a -> unit t) -> 'a list -> unit t

(** [read_line ic] will read a single line terminated
by CR or CRLF from the input channel [ic]. It returns
{!None} if EOF or other error condition is reached. *)
val read_line : ic -> string option t

(** [read ic len] will block until a maximum of [len] characters
are read from the input channel [ic]. It returns an
empty string if EOF or some other error condition occurs
on the input channel, and can also fewer than [len] if
input buffering is not sufficient to satisfy the request. *)
val read : ic -> int -> string t
val read_exactly : ic -> int -> string option t

(** [read_exactly ic len] will block until exactly [len] characters
are read from the input channel [ic]. If EOF or some other
error condition is reached, then {!None} is returned. *)
val read_exactly : ic -> int -> string option t

(** [write oc s] will block until the complete [s] string is
written to the output channel [oc]. *)
val write : oc -> string -> unit t

(** [flush oc] will return when all previously buffered content
from calling {!write} have been written to the output channel
[oc]. *)
val flush : oc -> unit t
end

Expand Down
6 changes: 3 additions & 3 deletions setup.ml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(* setup.ml generated for the first time by OASIS v0.4.5 *)

(* OASIS_START *)
(* DO NOT EDIT (digest: 54ae75205e056e18f5770732f89fef88) *)
(* DO NOT EDIT (digest: f9d0dadd97652f942f89c1f80d559a1f) *)
(*
Regenerated by OASIS v0.4.5
Visit http://oasis.forge.ocamlcore.org for more information and
Expand Down Expand Up @@ -6975,7 +6975,7 @@ let setup_t =
alpha_features = [];
beta_features = [];
name = "cohttp";
version = "0.14.0";
version = "0.15.0";
license =
OASISLicense.DEP5License
(OASISLicense.DEP5Unit
Expand Down Expand Up @@ -8353,7 +8353,7 @@ let setup_t =
};
oasis_fn = Some "_oasis";
oasis_version = "0.4.5";
oasis_digest = Some "��y\024�\030yG\141��zL}\014�";
oasis_digest = Some "3�\017\030@�٠����\007w��";
oasis_exec = None;
oasis_setup_args = [];
setup_update = false
Expand Down