.TH "Eliom_registration.Eliom_tmpl" 3o 2012-06-11 OCamldoc "" .SH NAME Eliom_registration.Eliom_tmpl \- no description .SH Module Module Eliom_registration.Eliom_tmpl .SH Documentation .sp Module .BI "Eliom_tmpl" : .B functor (Appl : ELIOM_APPL) -> functor (Tmpl_param : TMPL_PARAMS) -> sig end .sp .sp .B "Parameters:" .sp "Appl" .B Eliom_registration.ELIOM_APPL .sp "Tmpl_param" .B Eliom_registration.TMPL_PARAMS .sp .sp .PP .B === .B Service registration .B === .PP .I val register : .B ?scope:[< Eliom_common.scope ] -> .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B ?secure_session:bool -> .B service:('a, 'b, [< Eliom_service.internal_service_kind ], .B [< Eliom_service.suff ], 'c, 'd, [ `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service -> .B ?error_handler:((string * exn) list -> Tmpl_param.t Lwt.t) -> .B ('a -> 'b -> Tmpl_param.t Lwt.t) -> unit .sp The function .B register service handler will associate the .B service to the function .B handler \&. The .B handler function take two parameters, the GET and POST parameters of the current HTTP request, and should returns the corresponding page\&. .sp The optional parameter .B ~scope is .B Eliom_common\&.global by default, see the Eliom manual for detailled description \&. .sp The optional parameter .B ~options is specific to each output module, see the type description for more information\&. .sp The optional parameters .B ?charset , .B ?code , .B ?content_type and .B ?headers can be used to modify the HTTP answer sent by Eliom\&. Use this with care\&. .sp The optional parameter .B ~secure_session has no effect for scope .B Eliom_common\&.global \&. With other scopes, the parameter is used to force the session service table in which the .B handler will be registered\&. By default, the service is registred in the unsecure session if the current request\&'s protocol is .B http , or in the secure session if the protocol is .B https \&. If set to .B false (resp\&. .B true ) the .B handler will be stored in the unsecure (resp\&. secure) session\&. See the Eliom manual for an introduction to \&. .sp The optional parameter .B ~error_handler is used to specialize the error page when actual parameters aren\&'t compatible with the expected type\&. The default error handler is .B fun l \-> raise ( .B Eliom_common\&.Eliom_Typing_Error .B l) \&. .sp .sp .I val register_service : .B ?scope:[< Eliom_common.scope ] -> .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B ?secure_session:bool -> .B ?https:bool -> .B ?priority:int -> .B path:Eliom_lib.Url.path -> .B get_params:('a, [< Eliom_service.suff ] as 'b, 'c) .B Eliom_parameter.params_type -> .B ?error_handler:((string * exn) list -> Tmpl_param.t Lwt.t) -> .B ('a -> unit -> Tmpl_param.t Lwt.t) -> .B ('a, unit, .B [> `Attached of .B ([> `Internal of [> `Service ] ], [> `Get ]) Eliom_service.a_s ], .B 'b, 'c, unit, [< Eliom_service.registrable > `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service .sp Same as .B Eliom_service\&.service followed by .B register \&. .sp .sp .I val register_coservice : .B ?scope:[< Eliom_common.scope ] -> .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B ?secure_session:bool -> .B ?name:string -> .B ?csrf_safe:bool -> .B ?csrf_scope:[< Eliom_common.user_scope ] -> .B ?csrf_secure:bool -> .B ?max_use:int -> .B ?timeout:float -> .B ?https:bool -> .B fallback:(unit, unit, .B [ `Attached of .B ([ `Internal of [ `Service ] ], [ `Get ]) Eliom_service.a_s ], .B [ `WithoutSuffix ], unit, unit, [< Eliom_service.registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service -> .B get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type -> .B ?error_handler:((string * exn) list -> Tmpl_param.t Lwt.t) -> .B ('a -> unit -> Tmpl_param.t Lwt.t) -> .B ('a, unit, .B [> `Attached of .B ([> `Internal of [> `Coservice ] ], [> `Get ]) Eliom_service.a_s ], .B [ `WithoutSuffix ], 'b, unit, [< Eliom_service.registrable > `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service .sp Same as .B Eliom_service\&.coservice followed by .B register \&. .sp .sp .I val register_coservice' : .B ?scope:[< Eliom_common.scope ] -> .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B ?secure_session:bool -> .B ?name:string -> .B ?csrf_safe:bool -> .B ?csrf_scope:[< Eliom_common.user_scope ] -> .B ?csrf_secure:bool -> .B ?max_use:int -> .B ?timeout:float -> .B ?https:bool -> .B get_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type -> .B ?error_handler:((string * exn) list -> Tmpl_param.t Lwt.t) -> .B ('a -> unit -> Tmpl_param.t Lwt.t) -> .B ('a, unit, [> `Nonattached of [> `Get ] Eliom_service.na_s ], .B [ `WithoutSuffix ], 'b, unit, [< Eliom_service.registrable > `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service .sp Same as .B Eliom_service\&.coservice\&' followed by .B register \&. .sp .sp .I val register_post_service : .B ?scope:[< Eliom_common.scope ] -> .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B ?secure_session:bool -> .B ?https:bool -> .B ?priority:int -> .B fallback:('a, unit, .B [ `Attached of .B ([ `Internal of [ `Coservice | `Service ] ], [ `Get ]) .B Eliom_service.a_s ], .B [< Eliom_service.suff ] as 'b, 'c, unit, [< `Registrable ], 'd) .B Eliom_service.service -> .B post_params:('e, [ `WithoutSuffix ], 'f) Eliom_parameter.params_type -> .B ?error_handler:((string * exn) list -> Tmpl_param.t Lwt.t) -> .B ('a -> 'e -> Tmpl_param.t Lwt.t) -> .B ('a, 'e, .B [> `Attached of .B ([> `Internal of [ `Coservice | `Service ] ], [> `Post ]) .B Eliom_service.a_s ], .B 'b, 'c, 'f, [< Eliom_service.registrable > `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service .sp Same as .B Eliom_service\&.post_service followed by .B register \&. .sp .sp .I val register_post_coservice : .B ?scope:[< Eliom_common.scope ] -> .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B ?secure_session:bool -> .B ?name:string -> .B ?csrf_safe:bool -> .B ?csrf_scope:[< Eliom_common.user_scope ] -> .B ?csrf_secure:bool -> .B ?max_use:int -> .B ?timeout:float -> .B ?https:bool -> .B fallback:('a, unit, .B [ `Attached of .B ([ `Internal of [< `Coservice | `Service ] ], [ `Get ]) .B Eliom_service.a_s ], .B [< Eliom_service.suff ] as 'b, 'c, unit, [< `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service -> .B post_params:('d, [ `WithoutSuffix ], 'e) Eliom_parameter.params_type -> .B ?error_handler:((string * exn) list -> Tmpl_param.t Lwt.t) -> .B ('a -> 'd -> Tmpl_param.t Lwt.t) -> .B ('a, 'd, .B [> `Attached of .B ([> `Internal of [> `Coservice ] ], [> `Post ]) Eliom_service.a_s ], .B 'b, 'c, 'e, [< Eliom_service.registrable > `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service .sp Same as .B Eliom_service\&.post_coservice followed by .B register \&. .sp .sp .I val register_post_coservice' : .B ?scope:[< Eliom_common.scope ] -> .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B ?secure_session:bool -> .B ?name:string -> .B ?csrf_safe:bool -> .B ?csrf_scope:[< Eliom_common.user_scope ] -> .B ?csrf_secure:bool -> .B ?max_use:int -> .B ?timeout:float -> .B ?keep_get_na_params:bool -> .B ?https:bool -> .B post_params:('a, [ `WithoutSuffix ], 'b) Eliom_parameter.params_type -> .B ?error_handler:((string * exn) list -> Tmpl_param.t Lwt.t) -> .B (unit -> 'a -> Tmpl_param.t Lwt.t) -> .B (unit, 'a, [> `Nonattached of [> `Post ] Eliom_service.na_s ], .B [ `WithoutSuffix ], unit, 'b, [< Eliom_service.registrable > `Registrable ], .B Eliom_registration.appl_service) .B Eliom_service.service .sp Same as .B Eliom_service\&.post_coservice\&' followed by .B register \&. .sp .sp .PP .B === .B Low\-level function .B === .PP .I val send : .B ?options:Eliom_registration.appl_service_options -> .B ?charset:string -> .B ?code:int -> .B ?content_type:string -> .B ?headers:Http_headers.t -> .B Tmpl_param.t -> .B (Appl.appl Eliom_registration.application_content, .B Eliom_registration.appl_service) .B Eliom_registration.kind Lwt.t .sp The function .B send page build the HTTP frame corresponding to .B page \&. This may be used for example in an service handler registered with .B Eliom_registration\&.Any\&.register or when building a custom output module\&. .sp .sp