diff --git a/doc/wiki/Documentation.md b/doc/wiki/Documentation.md index ad1d2494..89c4264c 100644 --- a/doc/wiki/Documentation.md +++ b/doc/wiki/Documentation.md @@ -14,7 +14,8 @@ The framework also provides a router component to help dispatching the incoming A service can be a web api, a web interface, … what ever run on top of HTTP. - + + # Service > see interface: **WSF_SERVICE** @@ -28,7 +29,8 @@ For convenience, the framework provides richer service interface that handles th > [Learn more about service](Documentation__Service) - + + # Request and Response > see interface: **WSF_REQUEST** and **WSF_RESPONSE** @@ -50,7 +52,8 @@ The **WSF_RESPONSE** represents the communication toward the client, a service n > [Learn more about request](Documentation__Request) and [about response](Documentation__Response) - + + # Connectors: > see **WGI_CONNECTOR** @@ -65,7 +68,8 @@ It is fairly easy to add new connector, it just has to follow the EWSGI interfac > [Learn more about connector](Documentation__Connector) - + + # Router or Request Dispatcher: > Routes HTTP requests to the proper execution code @@ -165,10 +169,12 @@ examples ## EWF application generators - + + # EWSGI Specification - + + # Libraries External libraries are included, such as Cypress OAuth (Security), HTML parsing library, Template Engine Smarty. diff --git a/doc/wiki/Documentation__Request.md b/doc/wiki/Documentation__Request.md index 09b73ab0..379df595 100644 --- a/doc/wiki/Documentation__Request.md +++ b/doc/wiki/Documentation__Request.md @@ -1 +1,17 @@ -See WSF_REQUEST \ No newline at end of file +See WSF_REQUEST + +## About parameters +Note that by default there is a smart computation for the query/post/... parameters: +for instance +- `q=a&q=b` : will create a **WSF_MULTIPLE_STRING** parameter with name **q** and value `[a,b]` +- `tab[a]=ewf&tab[b]=demo` : will create a **WSF_TABLE** parameter with name **tab** and value `{ "a": "ewf", "b": "demo"}` +- `tab[]=ewf&tab[]=demo` : will create a **WSF_TABLE** parameter with name **tab** and value `{ "1": "ewf", "2": "demo"}` +- `tab[foo]=foo&tab[foo]=bar` : will create a **WSF_TABLE** parameter with name **tab** and value `{ "foo": "bar"}` **WARNING: only the last `tab[foo]` is kept**. + +Those rules are applied to query, post, path, .... parameters. + +## How to get the input data (i.e entity-body) ? +See `{WSF_REQUEST}.read_input_data_into (buf: STRING)` + +## How to get the raw header data (i.e the http header text) ? +See `{WSF_REQUEST}.raw_header_data: detachable READABLE_STRING_32`