Module type Eliom_service_sigs.TYPES
module type TYPES = sig..end
Auxiliary service-related types ¶
type get = | Get_method
type put = | Put_method
type post = | Post_method
type delete = | Delete_method
type co = | Co
type non_co = | Non_co
type ext = | Ext
type non_ext = | Non_ext
type http = | Http_ret
type 'a ocaml = | Ocaml of 'a
type non_ocaml = | Non_ocaml
type reg = | Reg
type non_reg = | Non_reg
type ('get, [< `WithSuffix | `WithoutSuffix ], 'gn) params =
('get, [< `WithSuffix | `WithoutSuffix ] as 'a, 'gn)
Eliom_parameter.params_type
Method specification ¶
Method specification datatype
An Eliom service (see Eliom_service_sigs.S.t) can respond to one of the following HTTP methods:
- GET (Get g)
- POST (Post (g, p))
- PUT (Put g)
- DELETE (Delete g)
In all cases, the service parameters need to be provided (see Eliom_parameter_sigs.S). POST (Post (g, p)) services accept both GET (g) and POST (p) parameters. For the other methods, only GET (g) parameters apply.
The type parameters are used to impose various type constraints, and are not necessarily of interest to the programmer. Their technical meaning is as follows.
- 0-th param : method
- params 1-4 : GET and POST parameter types and names
- param 5 : suffix parameters permitted or not
- param 6 : non-unit only for the Post (g, p) case when g is not unit ; used to force unit GET parameters when needed
type ('m, '_, '_, '_, '_, '_, '_) meth = | Get of
('gp, [< `WithSuffix | `WithoutSuffix ], 'gn)
params | Post of
('gp0, [< `WithSuffix | `WithoutSuffix ], 'gn0)
params
* ('pp, [ `WithoutSuffix ], 'pn)
params | Put of
('gp1, [< `WithSuffix | `WithoutSuffix ], 'gn1)
params | Delete of
('gp2, [< `WithSuffix | `WithoutSuffix ], 'gn2)
params
type 'm which_meth = | Get' | Post' | Put' | Delete'
Like Eliom_service_sigs.TYPES.meth but without the parameters