package eliom

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type get =
  1. | Get_method
type put =
  1. | Put_method
type post =
  1. | Post_method
type delete =
  1. | Delete_method
type co =
  1. | Co
type non_co =
  1. | Non_co
type ext =
  1. | Ext
type non_ext =
  1. | Non_ext
type http =
  1. | Http_ret
type 'a ocaml =
  1. | Ocaml of 'a
type non_ocaml =
  1. | Non_ocaml
type reg =
  1. | Reg
type non_reg =
  1. | Non_reg
type ('get, 'tipo, 'gn) params = ('get, 'tipo, 'gn) Eliom_parameter.params_type constraint 'tipo = [< `WithSuffix | `WithoutSuffix ]

Method specification

type ('m, _, _, _, _, _, _) meth =
  1. | Get : ('gp, 'tipo, 'gn) params -> (get, 'gp, 'gn, unit, unit, 'tipo, unit) meth
  2. | Post : ('gp, 'tipo, 'gn) params * ('pp, [ `WithoutSuffix ], 'pn) params -> (post, 'gp, 'gn, 'pp, 'pn, 'tipo, 'gp) meth
  3. | Put : ('gp, 'tipo, 'gn) params -> (put, 'gp, 'gn, Eliom_parameter.raw_post_data, Eliom_parameter.no_param_name, 'tipo, unit) meth
  4. | Delete : ('gp, 'tipo, 'gn) params -> (delete, 'gp, 'gn, Eliom_parameter.raw_post_data, Eliom_parameter.no_param_name, 'tipo, unit) meth

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 which_meth =
  1. | Get' : get which_meth
  2. | Post' : post which_meth
  3. | Put' : put which_meth
  4. | Delete' : delete which_meth

Like meth but without the parameters