56648d988103c3ef98d9e18be4cd51065328a6d1
[yaffs-website] / commands / headers / add_header.md
1 add_header
2 ========
3 This command allows you to set an additional headers for the future page requests via GastonJS.
4
5 ##Adding a temporal header
6 This header will be valid for ONE request only, after that request it will disappear.
7 ```json
8 {
9     "name": "add_header",
10     "args": [
11         {
12             "X-Temporal-Header": "x_temporal_value"
13         },
14         false
15     ]
16 }
17 ```
18 Response should be:
19 ```json
20 {
21     "response": true
22 }
23 ```
24
25 ##Adding a permanent header
26 This header will be valid for all the requests.
27 ```json
28 {
29     "name": "add_header",
30     "args": [
31         {
32             "X-Permanent-Test": "x_permanent_value"
33         },
34         true
35     ]
36 }
37 ```
38 Response should be:
39 ```json
40 {
41   "response": true
42 }
43 ```