---
name: "Eliom_registration.Streamlist.server"
section: "3o"
platform: "linux"
package: "libeliom-ocaml-doc"
version: "4.0.0-2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Eliom_registration.Streamlist.server"
---

# Eliom\_registration.Streamlist.server(3o)

Eliom service registration for services that returns "byte" contents with {% \<\<a\_api project="ocsigenserver" text="Ocsigen's streams"\| module Ocsigen\_stream\>\> %}.

## NAME

Eliom\_registration.Streamlist - Eliom service registration for services that returns "byte" contents with {% \<\<a\_api project="ocsigenserver" text="Ocsigen's streams"\| module Ocsigen\_stream\>\> %}.

## Module

Module   Eliom\_registration.Streamlist

## Documentation

Module **Streamlist**\
  :  **sig end**

Eliom service registration for services that returns "byte" contents with . The page content is a pair **(stream\_creator\_list, content\_type)** . See also  **Eliom\_registration.String** for another kind of service that returns "byte" contents.

Streams are created by calling the functions in the list and  is called at the end of the stream. If something goes wrong while processing a stream, the current stream is closed and the following streams are not created.

**===** **Service registration** **===**

*val register* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **service:('get, 'post, \[\< Eliom\_service.internal\_service\_kind \],** **\[\< Eliom\_service.suff \], 'gn, 'pn, \[ \`Registrable \],** **\[\< Eliom\_service.non\_ocaml\_service \])** **Eliom\_service.service -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **'post -\> ((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) 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 .

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 .

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\_Error** **l)** .

*val register\_service* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?https:bool -\>** **?priority:int -\>** **path:Eliom\_lib.Url.path -\>** **get\_params:('get, \[\< Eliom\_service.suff \] as 'a, 'gn)** **Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **unit -\> ((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, unit,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Service \] \], \[\> \`Get \]) Eliom\_service.a\_s \],** **'a, 'gn, unit, \[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.service** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_coservice* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?https:bool -\>** **fallback:(unit, unit,** **\[ \`Attached of** **(\[ \`Internal of \[ \`Service \] \], \[ \`Get \]) Eliom\_service.a\_s \],** **\[ \`WithoutSuffix \], unit, unit, \[\< Eliom\_service.registrable \],** **\[\< Eliom\_service.non\_ocaml\_service \])** **Eliom\_service.service -\>** **get\_params:('get, \[ \`WithoutSuffix \], 'gn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **unit -\> ((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, unit,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Coservice \] \], \[\> \`Get \]) Eliom\_service.a\_s \],** **\[ \`WithoutSuffix \], 'gn, unit,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.coservice** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_coservice'* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?https:bool -\>** **get\_params:('get, \[ \`WithoutSuffix \], 'gn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **unit -\> ((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, unit, \[\> \`Nonattached of \[\> \`Get \] Eliom\_service.na\_s \],** **\[ \`WithoutSuffix \], 'gn, unit,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.coservice'** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_post\_service* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?https:bool -\>** **?priority:int -\>** **fallback:('get, unit,** **\[ \`Attached of** **(\[ \`Internal of \[ \`Coservice \| \`Service \] \], \[ \`Get \])** **Eliom\_service.a\_s \],** **\[\< Eliom\_service.suff \] as 'a, 'gn, unit, \[\< \`Registrable \],** **\[\< Eliom\_service.non\_ocaml\_service \])** **Eliom\_service.service -\>** **post\_params:('post, \[ \`WithoutSuffix \], 'pn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **'post -\> ((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, 'post,** **\[\> \`Attached of** **(\[\> \`Internal of \[ \`Coservice \| \`Service \] \], \[\> \`Post \])** **Eliom\_service.a\_s \],** **'a, 'gn, 'pn, \[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.post\_service** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_post\_coservice* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?https:bool -\>** **fallback:('get, unit,** **\[ \`Attached of** **(\[ \`Internal of \[\< \`Coservice \| \`Service \] \], \[ \`Get \])** **Eliom\_service.a\_s \],** **\[\< Eliom\_service.suff \] as 'a, 'gn, unit, \[\< \`Registrable \],** **\[\< Eliom\_service.non\_ocaml\_service \])** **Eliom\_service.service -\>** **post\_params:('post, \[ \`WithoutSuffix \], 'pn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **'post -\> ((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, 'post,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Coservice \] \], \[\> \`Post \]) Eliom\_service.a\_s \],** **'a, 'gn, 'pn, \[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.post\_coservice** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_post\_coservice'* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?keep\_get\_na\_params:bool -\>** **?https:bool -\>** **post\_params:('post, \[ \`WithoutSuffix \], 'pn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **(unit -\>** **'post -\> ((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **(unit, 'post, \[\> \`Nonattached of \[\> \`Post \] Eliom\_service.na\_s \],** **\[ \`WithoutSuffix \], unit, 'pn,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.post\_coservice'** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_put\_service* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?https:bool -\>** **?priority:int -\>** **path:Eliom\_lib.Url.path -\>** **get\_params:('get, \[\< Eliom\_service.suff \] as 'a, 'gn)** **Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **Eliom\_parameter.raw\_post\_data -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, Eliom\_parameter.raw\_post\_data,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Service \] \], \[\> \`Put \]) Eliom\_service.a\_s \],** **'a, 'gn, Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.put\_service** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_put\_coservice* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?https:bool -\>** **fallback:(unit, Eliom\_parameter.raw\_post\_data,** **\[ \`Attached of** **(\[ \`Internal of \[ \`Service \] \], \[ \`Put \]) Eliom\_service.a\_s \],** **\[ \`WithoutSuffix \], unit, Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \],** **\[\< Eliom\_service.non\_ocaml\_service \])** **Eliom\_service.service -\>** **get\_params:('get, \[ \`WithoutSuffix \], 'gn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **Eliom\_parameter.raw\_post\_data -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, Eliom\_parameter.raw\_post\_data,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Coservice \] \], \[\> \`Put \]) Eliom\_service.a\_s \],** **\[ \`WithoutSuffix \], 'gn, Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.put\_coservice** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_put\_coservice'* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?https:bool -\>** **get\_params:('get, \[ \`WithoutSuffix \], 'gn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **Eliom\_parameter.raw\_post\_data -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, Eliom\_parameter.raw\_post\_data,** **\[\> \`Nonattached of \[\> \`Put \] Eliom\_service.na\_s \], \[ \`WithoutSuffix \], 'gn,** **Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.put\_coservice'** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_delete\_service* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?https:bool -\>** **?priority:int -\>** **path:Eliom\_lib.Url.path -\>** **get\_params:('get, \[\< Eliom\_service.suff \] as 'a, 'gn)** **Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **Eliom\_parameter.raw\_post\_data -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, Eliom\_parameter.raw\_post\_data,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Service \] \], \[\> \`Delete \]) Eliom\_service.a\_s \],** **'a, 'gn, Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.delete\_service** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_delete\_coservice* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?https:bool -\>** **fallback:(unit, Eliom\_parameter.raw\_post\_data,** **\[ \`Attached of** **(\[ \`Internal of \[ \`Service \] \], \[ \`Delete \]) Eliom\_service.a\_s \],** **\[ \`WithoutSuffix \], unit, Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \],** **\[\< Eliom\_service.non\_ocaml\_service \])** **Eliom\_service.service -\>** **get\_params:('get, \[ \`WithoutSuffix \], 'gn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **Eliom\_parameter.raw\_post\_data -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, Eliom\_parameter.raw\_post\_data,** **\[\> \`Attached of** **(\[\> \`Internal of \[\> \`Coservice \] \], \[\> \`Delete \]) Eliom\_service.a\_s \],** **\[ \`WithoutSuffix \], 'gn, Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.delete\_coservice** followed by  **Eliom\_registration.Streamlist.register** .

*val register\_delete\_coservice'* :  **?scope:\[\< Eliom\_common.scope \] -\>** **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **?secure\_session:bool -\>** **?name:string -\>** **?csrf\_safe:bool -\>** **?csrf\_scope:\[\< Eliom\_common.user\_scope \] -\>** **?csrf\_secure:bool -\>** **?max\_use:int -\>** **?timeout:float -\>** **?https:bool -\>** **get\_params:('get, \[ \`WithoutSuffix \], 'gn) Eliom\_parameter.params\_type -\>** **?error\_handler:((string \* exn) list -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get -\>** **Eliom\_parameter.raw\_post\_data -\>** **((unit -\> string Ocsigen\_stream.t Lwt.t) list \* string) Lwt.t) -\>** **('get, Eliom\_parameter.raw\_post\_data,** **\[\> \`Nonattached of \[\> \`Delete \] Eliom\_service.na\_s \], \[ \`WithoutSuffix \],** **'gn, Eliom\_parameter.no\_param\_name,** **\[\< Eliom\_service.registrable \> \`Registrable \],** **\[\> Eliom\_service.http\_service \])** **Eliom\_service.service**

Same as  **Eliom\_service.Http.delete\_coservice'** followed by  **Eliom\_registration.Streamlist.register** .

**===** **Low-level function** **===**

*val send* :  **?options:unit -\>** **?charset:string -\>** **?code:int -\>** **?content\_type:string -\>** **?headers:Http\_headers.t -\>** **(unit -\> string Ocsigen\_stream.t Lwt.t) list \* string -\>** **Eliom\_registration.unknown\_content Eliom\_registration.kind 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.
