clzversion

Compression support for cohttp-lwt client using decompress

The library interface tries to stay somewhat close to dream-encoding.

Usage example:

let get_with_compression_support ?headers uri =
  let headers = Clz_cohttp.update_headers headers in
  let open Lwt.Syntax in
  let* resp, body = Cohttp_lwt_unix.Client.get ~headers uri in
  let status = Cohttp_lwt.Response.status resp in
  let* () = if status <> `OK then Cohttp_lwt.Body.drain_body body else Lwt.return_unit in
  match status with
  | `OK ->
    let body = Clz_cohttp.decompress (resp, body) in
    Lwt.return body
  | _ -> Lwt.fail_with "Not Ok"
AuthorMarcello Seri
LicenseMIT
Published
Homepagehttps://github.com/mseri/ocaml-clz
Issue Trackerhttps://github.com/mseri/ocaml-clz/issues
Maintainermarcello.seri@gmail.com
Dependencies
Conflicts
Source [http] https://github.com/mseri/ocaml-clz/releases/download/0.1.0/clz-0.1.0.tbz
sha256=98e87ae5b0283d866e5a888db59b5d63311c0c683faa0d3bea181cf28ac3c622
sha512=0fcf11ca574c387102ea642dd124236823eb3f751f93637059ee6ceddb431dda05177d78a467d78b8e7a9210797d97b34322fd941cd7a677d1ac65d1da5068a2
Edithttps://github.com/ocaml/opam-repository/tree/master/packages/clz/clz.0.1.0/opam
Required by