Merge branch 'master' of https://github.com/EiffelWebFramework/EWF.wiki
This commit is contained in:
@@ -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.
|
A service can be a web api, a web interface, … what ever run on top of HTTP.
|
||||||
|
|
||||||
<a name="wiki-service"/>
|
<a name="wiki-service"></a>
|
||||||
|
<a name="service"></a>
|
||||||
# Service
|
# Service
|
||||||
> see interface: **WSF_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)
|
> [Learn more about service](Documentation__Service)
|
||||||
|
|
||||||
<a name="wiki-request"/><a name="wiki-response"/><a name="wiki-request-and-response"/>
|
<a name="wiki-request"></a><a name="wiki-response"></a><a name="wiki-request-and-response"></a>
|
||||||
|
<a name="request"></a><a name="response"></a><a name="request-and-response"></a>
|
||||||
# Request and Response
|
# Request and Response
|
||||||
> see interface: **WSF_REQUEST** and **WSF_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)
|
> [Learn more about request](Documentation__Request) and [about response](Documentation__Response)
|
||||||
|
|
||||||
<a name="wiki-connector"/>
|
<a name="wiki-connector"></a>
|
||||||
|
<a name="connector"></a>
|
||||||
# Connectors:
|
# Connectors:
|
||||||
> see **WGI_CONNECTOR**
|
> 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)
|
> [Learn more about connector](Documentation__Connector)
|
||||||
|
|
||||||
<a name="wiki-router"/>
|
<a name="wiki-router"></a>
|
||||||
|
<a name="router"></a>
|
||||||
# Router or Request Dispatcher:
|
# Router or Request Dispatcher:
|
||||||
> Routes HTTP requests to the proper execution code
|
> Routes HTTP requests to the proper execution code
|
||||||
|
|
||||||
@@ -165,10 +169,12 @@ examples
|
|||||||
## EWF application generators
|
## EWF application generators
|
||||||
|
|
||||||
|
|
||||||
<a name="wiki-EWSGI"/>
|
<a name="wiki-EWSGI"></a>
|
||||||
|
<a name="EWSGI"></a>
|
||||||
# EWSGI Specification
|
# EWSGI Specification
|
||||||
|
|
||||||
<a name="wiki-libraries"/>
|
<a name="wiki-libraries"></a>
|
||||||
|
<a name="libraries"></a>
|
||||||
# Libraries
|
# Libraries
|
||||||
|
|
||||||
External libraries are included, such as Cypress OAuth (Security), HTML parsing library, Template Engine Smarty.
|
External libraries are included, such as Cypress OAuth (Security), HTML parsing library, Template Engine Smarty.
|
||||||
|
|||||||
@@ -1 +1,17 @@
|
|||||||
See WSF_REQUEST
|
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`
|
||||||
|
|||||||
Reference in New Issue
Block a user