This is client API (go to server)

Module Eliom_registration.​Redirection

module Redirection : 
  Eliom_registration_sigs.S
with type page = Eliom_service.non_ocaml redirection
and type options =
[ `MovedPermanently
| `Found
| `SeeOther
| `NotNodifed
| `UseProxy
| `TemporaryRedirect ]
and type return = Eliom_service.non_ocaml
and type result = browser_content kind

type page
type options
type return = Eliom_service.non_ocaml
type result

Service registration

val register : 
  ?app:string ->
  ?scope:[< Eliom_common.scope ] ->
  ?options:options ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  service:('get, 'post, 'a, 'b, 'c, Eliom_service.non_ext,
   Eliom_service.reg, [< `WithSuffix | `WithoutSuffix ], 'd, 'e,
   return)
   Eliom_service.t ->
  ?error_handler:((string * exn) list ->
   page Lwt.t) ->
  ('get -> 'post -> page Lwt.t) -> unit

The function register service handler will associate the service to the function handler. The handler function take two parameters, the GET and POST parameters of the current HTTP request, and should returns the corresponding page.

The optional parameter ~scope is Eliom_common.global_scope by default, see the Eliom manual for detailled description of different scope.

The optional parameter ~options is specific to each output module, see the type description for more information.

The optional parameters ?charset, ?code, ?content_type and ?headers can be used to modify the HTTP answer sent by Eliom. Use this with care.

The optional parameter ~secure_session has no effect for scope Eliom_common.global_scope. With other scopes, the parameter is used to force the session service table in which the handler will be registered. By default, the service is registred in the unsecure session if the current request's protocol is http, or in the secure session if the protocol is https. If set to false (resp. true) the handler will be stored in the unsecure (resp. secure) session. See the Eliom manual for an introduction to secure state.

The optional parameter ~error_handler is used to specialize the error page when actual parameters aren't compatible with the expected type. The default error handler is fun l -> raise (Eliom_common.Eliom_Typing_Errorl).

val create : 
  ?app:string ->
  ?scope:[< Eliom_common.scope ] ->
  ?options:options ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  ?secure_session:bool ->
  ?https:bool ->
  ?name:string ->
  ?csrf_safe:bool ->
  ?csrf_scope:[< Eliom_common.user_scope ] ->
  ?csrf_secure:bool ->
  ?max_use:int ->
  ?timeout:float ->
  meth:('m, 'gp, 'gn, 'pp, 'pn, [< `WithSuffix | `WithoutSuffix ] as 'a,
   'mf, 'gp_)
   Eliom_service.meth ->
  id:('att, 'co, Eliom_service.non_ext, Eliom_service.reg, 'mf,
   return, 'gp_)
   Eliom_service.id ->
  ?error_handler:((string * exn) list ->
   page Lwt.t) ->
  ('gp -> 'pp -> page Lwt.t) ->
  ('gp, 'pp, 'm, 'att, 'co, Eliom_service.non_ext, Eliom_service.reg,
   'a, 'gn, 'pn, return)
  Eliom_service.t

Same as Eliom_service.create followed by Eliom_registration_sigs.​S.​register.

val send : 
  ?options:options ->
  ?charset:string ->
  ?code:int ->
  ?content_type:string ->
  ?headers:Http_headers.t ->
  page ->
  result Lwt.t

The function send page build the HTTP frame corresponding to page. This may be used for example in an service handler registered with Eliom_registration.Any.register or when building a custom output module.