package dream-encoding

All checked builds pass
  1. Overview
  2. Docs
Encoding primitives for Dream

Install

dune-project
 Dependency

Authors

Maintainers

Sources

dream-encoding-0.3.0.tbz
sha256=5778442d5d1e2cede3657151242fd2aac12176546fb76fc4d0a5181bd32605ef
sha512=085dfc2cd97ecb1cf94b84431639de3e394b315f728bac20590d22e4ce42be9536957dae641ad758d8637582f9853e4d5bfa1857620af596372bf172b6fe842a

Description

Encoding primitives for Dream.

Added to opam-repository:

README

Dream Encoding

Actions Status

Encoding primitives for Dream.

Usage

The most common usage is to add the Dream_encoding.compress middleware to your Dream application:

let () =
  Dream.run ~debug:true
  @@ Dream.logger
  @@ Dream_encoding.compress
  @@ Dream.router [ Dream.get "/" (fun _ -> Dream.html "Hello World!") ]
  @@ Dream.not_found

The middleware will parse the Accept-Encoding header from the requests and compress the responses accordingly.

The library API also includes other lower-level functions for convenience, and are documented here.

Limitation

As of now, the only supported encoding directives are gzip and deflate.

Support for more compression methods will come when they are supported in decompress, the underlying compression library used in dream-encoding.

To Do

  • Support Brotli compression (see https://github.com/mirage/decompress/issues/101)

Dependencies (5)

  1. lwt_ppx
  2. decompress >= "1.4.1"
  3. dream >= "1.0.0~alpha3"
  4. ocaml >= "4.08.0"
  5. dune >= "2.7"

Dev Dependencies (1)

  1. odoc with-doc

Optional Dependencies

None

Used by

None

Conflicts (1)

  1. result < "1.5"

Build status

Results of building dream-encoding with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.3.0 (this version) good good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure