Add a readme to parameters + update some text

This commit is contained in:
Joris Vink 2014-08-04 19:02:23 +02:00
parent 4a7653f195
commit b3f65ae13f
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
Example on how to handle GET/POST parameters in Kore.
Run:
```
# kore run
```
Test:
```
# curl -i -k https://127.0.0.1:8888/?id=123123
```
The output will differ based on wether or not id is a valid
u_int16_t number or not. (the string should always be present).

View File

@ -17,6 +17,10 @@ domain 127.0.0.1 {
static / page
# The parameters allowed for "/" (GET method).
#
# If you would want to declare parameters available
# to the page handler for POST, swap the 'get' setting
# to 'post' instead, Kore takes care of the rest.
params get / {
# Validate the id parameter with the v_id validator.
validate id v_id