1 // Example using HTTP POST operation
4 var page = require('webpage').create(),
5 server = 'http://posttestserver.com/post.php?dump',
6 data = '{"universe": "expanding", "answer": 42}';
9 "Content-Type": "application/json"
12 page.open(server, 'post', data, headers, function (status) {
13 if (status !== 'success') {
14 console.log('Unable to post!');
16 console.log(page.content);