Version 1
[yaffs-website] / vendor / jcalderonzumba / gastonjs / docs / api / commands / cookies / set_cookie.md
1 set_cookie
2 ===========
3 Command to add a Cookie to PhantomJS CookieJar.
4
5 Returns `true` if cookie was successfully added, `false` otherwise
6 ##Set a cookie request
7 ```json
8 {
9     "name": "set_cookie",
10     "args": [
11         {
12             "name": "mycookie",
13             "value": "myvalue",
14             "path": "/",
15             "domain": "gastonjs.readthedocs.org"
16         }
17     ]
18 }
19 ```
20 ##Set a cookie response
21 ```json
22 {
23     "response": true
24 }
25 ```
26
27 For more information on how the Cookie JSON object should be check [addCookie](http://phantomjs.org/api/phantom/method/add-cookie.html) in PhantomJS documentation