Module Registration.CssText
module CssText :
Registration_sigs.S_with_create
with type page = string
and type options = int
and type return = Service.non_ocaml
and type result = browser_content kind
Eliom service registration for services that returns CSS. The page content is a string that must contains valid CSS and the content type is always text/css. The option is the optional "Cache-policy: max-age" header value to be sent.
include Registration_sigs.S
val create :
?app:string ->
?scope:[< Eliom_common.scope ] ->
?options:options ->
?charset:string ->
?code:int ->
?content_type:string ->
?headers:Cohttp.Header.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,
'gp_)
Service.meth ->
path:('att, 'co, 'gp_) Service.path_option ->
?error_handler:((string * exn) list -> page Lwt.t) ->
('gp -> 'pp -> page Lwt.t) ->
('gp, 'pp, 'm, 'att, 'co, Service.non_ext, Service.reg, 'a, 'gn, 'pn,
return)
Service.t
Create a service and register it at the same time. It calls Service.create and then performs Registration_sigs.S.register. Returns the service.
val create_attached_get :
?app:string ->
?scope:[< Eliom_common.scope ] ->
?options:options ->
?charset:string ->
?code:int ->
?content_type:string ->
?headers:Cohttp.Header.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 ->
fallback:(unit, unit, Service.get, Service.att, Service.non_co,
Service.non_ext, 'a, [ `WithoutSuffix ], unit,
unit, return)
Service.t ->
get_params:('gp, [ `WithoutSuffix ], 'gn) Parameter.params_type ->
?error_handler:((string * exn) list -> page Lwt.t) ->
('gp -> unit -> page Lwt.t) ->
('gp, unit, Service.get, Service.att, Service.co, Service.non_ext,
Service.reg, [ `WithoutSuffix ], 'gn, unit, return)
Service.t
Create an attached service and register it at the same time. It calls Service.create_attached_get and then performs Registration_sigs.S.register. Returns the new service.
val create_attached_post :
?app:string ->
?scope:[< Eliom_common.scope ] ->
?options:options ->
?charset:string ->
?code:int ->
?content_type:string ->
?headers:Cohttp.Header.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 ->
fallback:('gp, unit, Service.get, Service.att, Service.non_co,
Service.non_ext, 'a, [ `WithoutSuffix ], 'gn,
unit, return)
Service.t ->
post_params:('pp, [ `WithoutSuffix ], 'pn) Parameter.params_type ->
?error_handler:((string * exn) list -> page Lwt.t) ->
('gp -> 'pp -> page Lwt.t) ->
('gp, 'pp, Service.post, Service.att, Service.co, Service.non_ext,
Service.reg, [ `WithoutSuffix ], 'gn, 'pn, return)
Service.t
Create an attached POST service and register it at the same time. It calls Service.create_attached_post and then performs Registration_sigs.S.register. Returns the new service.