Version 1
[yaffs-website] / vendor / jcalderonzumba / gastonjs / docs / api / commands / headers / add_header.md
diff --git a/vendor/jcalderonzumba/gastonjs/docs/api/commands/headers/add_header.md b/vendor/jcalderonzumba/gastonjs/docs/api/commands/headers/add_header.md
new file mode 100644 (file)
index 0000000..56648d9
--- /dev/null
@@ -0,0 +1,43 @@
+add_header
+========
+This command allows you to set an additional headers for the future page requests via GastonJS.
+
+##Adding a temporal header
+This header will be valid for ONE request only, after that request it will disappear.
+```json
+{
+    "name": "add_header",
+    "args": [
+        {
+            "X-Temporal-Header": "x_temporal_value"
+        },
+        false
+    ]
+}
+```
+Response should be:
+```json
+{
+    "response": true
+}
+```
+
+##Adding a permanent header
+This header will be valid for all the requests.
+```json
+{
+    "name": "add_header",
+    "args": [
+        {
+            "X-Permanent-Test": "x_permanent_value"
+        },
+        true
+    ]
+}
+```
+Response should be:
+```json
+{
+  "response": true
+}
+```