Further changes for the Use cases on the live site.
[yaffs-website] / node_modules / phantomjs-prebuilt / lib / phantom / examples / post.js
1 // Example using HTTP POST operation
2
3 "use strict";
4 var page = require('webpage').create(),
5     server = 'http://posttestserver.com/post.php?dump',
6     data = 'universe=expanding&answer=42';
7
8 page.open(server, 'post', data, function (status) {
9     if (status !== 'success') {
10         console.log('Unable to post!');
11     } else {
12         console.log(page.content);
13     }
14     phantom.exit();
15 });