E
E
EvolDev2015-07-15 15:41:55
JavaScript
EvolDev, 2015-07-15 15:41:55

Why is a post request not sent via ajax in phantomJS?

What could be the problem?

var webPage = require('webpage');
var page = webPage.create();
page.includeJs('http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js', function() {
        console.log('post:');
        $jQuery.post("http://httbpin.org/post", function(data) {
            console.log(data);
    });
});

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
EvolDev, 2015-07-15
@EvolDev

the issue is resolved, we managed to send a post using this method, after running phantomjs with

--web security=false

S
Sergey Melnikov, 2015-07-15
@mlnkv

$.post("http://httbpin.org/post", function(data) {
  console.log(data);
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question