Sha256: 2c751247bc3440bf1ae3ee18dc5ab39890300bd8ae41c6e6aad2cf0063a0de8d

Contents?: true

Size: 380 Bytes

Versions: 21

Compression:

Stored size: 380 Bytes

Contents

// Example using HTTP POST operation

var page = require('webpage').create(),
    server = 'http://posttestserver.com/post.php?dump',
    data = 'universe=expanding&answer=42';

page.open(server, 'post', data, function (status) {
    if (status !== 'success') {
        console.log('Unable to post!');
    } else {
        console.log(page.content);
    }
    phantom.exit();
});

Version data entries

21 entries across 19 versions & 3 rubygems

Version Path
phantomjs.rb-0.0.1 vendor/phantomjs-1.4.1_OSX/examples/post.js