package webmachine

Build not checked
  1. Overview
  2. Docs
A REST toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.5.0.tar.gz
sha256=242c87b3e01ab2ab7e7e79b51a9d6aeba4da6cb117fd61236cf53b7716771699
md5=bb9d0571a0877764e2a7a3c1bd4b6c61

Description

OCaml webmachine is a layer on top of cohttp that implements a state-machine-based HTTP request processor. It's particularly well-suited for writing RESTful APIs. As the name suggests, this is an OCaml port of the webmachine project.

Added to opam-repository:

README

ocaml-webmachine

ocaml-webmachine is a layer on top of cohttp that implements a state-machine-based HTTP request processor. It's particularly well-suited for writing RESTful APIs. As the name suggests, this is an OCaml port of the webmachine project.

Build Status

Installation

Install the library and its depenencies via OPAM:

opam install webmachine

Getting Started

webmachine implements this decision diagram to determine how an HTTP request should be handled. This includes validation, authentication, content negotiation, and caching. A resource specifies the decision that should be made at each node in the diagram by defining the appropriate method in a resource subclass. The correspondence is suggested by the name of the method for now. This will be better-documented in the future.

Examples

To build the examples in the examples/ subdirectory, reconfigure the build process and recompile:

./configure --enable-examples
make clean && make

Development

To install development dependencies, pin the package from the root of the repository:

opam pin add -n webmachine .
opam install --deps-only webmachine

After this, you may install a development version of the library using the install command as usual.

For building and running the tests during development, you will need to install the oUnit package and reconfigure the build process to enable tests:

opam install oUnit
jbuilder runtest

License

BSD3, see LICENSE file for its text.

Dependencies (7)

  1. re >= "1.3.0"
  2. base-bytes
  3. jbuilder >= "1.0+beta10"
  4. dispatch >= "0.3.0" & < "0.5.0"
  5. cohttp >= "0.21.0"
  6. calendar >= "2.03.2"
  7. ocaml >= "4.03"

Dev Dependencies (1)

  1. ounit with-test & >= "1.0.2"

Optional Dependencies

None

Conflicts

None

Build status

Results of building webmachine with each compiler on check.ci.ocaml.org, run of against opam-repository 78c202b. 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.

This version is not in the latest run; the versions below are.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.7.0 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