Skip to content

Instantly share code, notes, and snippets.

@darkowlzz
Created June 2, 2014 11:11
Show Gist options
  • Save darkowlzz/64f67361ac8a8417baa4 to your computer and use it in GitHub Desktop.
Save darkowlzz/64f67361ac8a8417baa4 to your computer and use it in GitHub Desktop.
zest sample - example.com
{
"about": "This is a Zest script. For more details about Zest visit https://developer.mozilla.org/en-US/docs/Zest",
"zestVersion": "0.3",
"title": "sample title",
"description": "sample description",
"prefix": "",
"author": "anon",
"generatedBy": "zest-addon for firefox",
"parameters": "",
"statements": [
{
"url": "http://example.com/",
"data": "",
"method": "GET",
"headers": "Host: example.com\r\nUser-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:29.0) Gecko/20100101 Firefox/29.0\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Language: en-US,en;q=0.5\r\nAccept-Encoding: gzip, deflate\r\n",
"response": {
"url": "http://example.com/",
"headers": "HTTP/1.1 200 OK\r\nAccept-Ranges: bytes\r\nCache-Control: max-age=604800\r\nContent-Type: text/html\r\nDate: Mon, 02 Jun 2014 09:40:11 GMT\r\nEtag: \"359670651\"\r\nExpires: Mon, 09 Jun 2014 09:40:11 GMT\r\nLast-Modified: Fri, 09 Aug 2013 23:54:35 GMT\r\nServer: ECS (cpm/F858)\r\nX-Cache: HIT\r\nx-ec-custom-error: 1\r\nContent-Length: 1270\r\n",
"body": "<!doctype html>\n<html>\n<head>\n <title>Example Domain</title>\n\n <meta charset=\"utf-8\" />\n <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <style type=\"text/css\">\n body {\n background-color: #f0f0f2;\n margin: 0;\n padding: 0;\n font-family: \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n \n }\n div {\n width: 600px;\n margin: 5em auto;\n padding: 50px;\n background-color: #fff;\n border-radius: 1em;\n }\n a:link, a:visited {\n color: #38488f;\n text-decoration: none;\n }\n @media (max-width: 700px) {\n body {\n background-color: #fff;\n }\n div {\n width: auto;\n margin: 0 auto;\n border-radius: 0;\n padding: 1em;\n }\n }\n </style> \n</head>\n\n<body>\n<div>\n <h1>Example Domain</h1>\n <p>This domain is established to be used for illustrative examples in documents. You may use this\n domain in examples without prior coordination or asking for permission.</p>\n <p><a href=\"http://www.iana.org/domains/example\">More information...</a></p>\n</div>\n</body>\n</html>\n",
"statusCode": 200,
"responseTimeInMs": 2000,
"elementType": "ZestResponse"
},
"assertions": [
{
"rootExpression": {
"code": 200,
"not": false,
"elementType": "ZestExpressionStatusCode"
},
"elementType": "ZestAssertion"
},
{
"rootExpression": {
"length": 1270,
"approx": 1,
"variableName": "response.body",
"not": false,
"elementType": "ZestExpressionLength"
},
"elementType": "ZestAssertion"
}
],
"followRedirect": "",
"index": 1,
"elementType": "ZestRequest"
}
],
"authentication": [],
"index": 1,
"elementType": "ZestScript"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment