package webmachine

  1. Overview
  2. Docs

A REST toolkit for OCaml.

Webmachine is a port of the Erlang project of the same name, designed to work as a REST-aware layer on top of cohttp.

To use this module, apply the Make functor to an IO and a CLOCK module, and subclass the resouce virtual class.

module type IO = sig ... end

The IO module signature abstracts over monadic futures library. It is a much reduced version of the module signature that appears in Cohttp, and as such is compatible with any module that conforms to Cohttp.S.IO.

module Rd : sig ... end

The Rd module is the means by which handlers access and manipulate request-specific information.

module type S = sig ... end
module type CLOCK = sig ... end

The CLOCK module signature defines a clock source, that is used with the Webmachine.Make(IO)(Clock) functor.

module Make (IO : IO) (Clock : CLOCK) : S with type +'a io = 'a IO.t

Innovation. Community. Security.