Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Opium.App
SourceAn opium app provides a set of convenience functions and types to construct a rock app.
An opium app is a simple builder wrapper around a rock app
A builder is a function that transforms an app
by adding some functionality. Builders are usuallys composed with a base app using (|>) to create a full app
A route is a function that returns a buidler that hooks up a handler to a url mapping
any methods
will bind a route to any http method inside of methods
all methods
will bind a route to a URL regardless of the http method. You may escape the actual method used from the request passed.
all methods
will bind a route to a URL regardless of the http method. You may escape the actual method used from the request passed.
Convert an opium app to a rock app
Start an opium server. The thread returned can be cancelled to shutdown the server
Convenience functions for a running opium app
val urlencoded_pairs_of_body :
Opium_kernel.Rock.Request.t ->
(string * string list) list Lwt.t
val respond :
?headers:Cohttp.Header.t ->
?code:Cohttp.Code.status_code ->
body ->
Opium_kernel.Rock.Response.t
val respond' :
?headers:Cohttp.Header.t ->
?code:Cohttp.Code.status_code ->
body ->
Opium_kernel.Rock.Response.t Lwt.t