GithubHelp home page GithubHelp logo

kkazuo / ocaml-webmachine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from inhabitedtype/ocaml-webmachine

0.0 3.0 0.0 249 KB

A REST toolkit for OCaml

License: Other

Makefile 0.23% OCaml 99.77%

ocaml-webmachine's Introduction

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
./configure --enable-tests
make && make test

License

BSD3, see LICENSE file for its text.

ocaml-webmachine's People

Contributors

ansiwen avatar brakmic avatar chris00 avatar foretspaisibles avatar kkazuo avatar olleolleolle avatar seliopou avatar slegrand45 avatar tmcgilchrist avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.