Webs is a toolkit for programming with HTTP in OCaml. It provides:
Webs is not a framework, it is a set of building blocks.
These manuals are available:
The examples directory of the repository has a few simple examples that use the APIs.
webs
Webs
HTTP requests and responses.webs.kit
Webs_gateway
Gateway interaction.Webs_hash
Hashing tools.Webs_authenticatable
Authenticatable data.Webs_authenticated_cookie
Authenticated cookies.Webs_session
Session handling.Webs_basic_auth
HTTP basic authentication.Webs_bazaar
Unstable service tools.webs.unix
Provides tools to send files and simple connectors. Depends on OCaml's unix
library.
Webs_unix
Webs Unix
tooling.Webs_thread_pool
Thread pools.Webs_listener
Socket connection listeners.Webs_fs
File system responses.Webs_cgi
CGI gateway connector.Webs_http11_gateway
HTTP/1.1 gateway connector.webs.cli
Standard command line options and quick service setup.
Webs_cli
Command line interface support.Webs_quick
Quick serves and fetches.Before using Webs for your project you should be aware of these current limitations:
https
. You need to pair your service with an HTTP gateway like Apache, nginx, etc. See the HTTP service howto for more details.application/x-www-form-urlencoded
content type for form posting but it's missing an implementation of the multipart/form
body content type (e.g. to upload files). This will be added in the future so that Webs.Http.Request.to_query
eventually abstracts over all forms of queries.Webs_http11_gateway
connector will not fare well if you need to support WebSockets or SSE at scale.Finally note that while Webs is unlikely to change drastically, making some breaking changes in the future is not excluded.