PhantomJS page.open operation Delete on another domain

时间:2016-10-20 19:13:47

标签: javascript ajax phantomjs

I have domain A calling domain B to perform rest calls.

I am trying to send a rest api call from domain A that will delete an object on domain B. But the instead of sending operation DELETE, phantomjs sends operation POST.

I have tried the same with ajax, but i run into cross-domain not permitted issue.

var webPage = require('webpage');
var page = webPage.create();
var setting = {
    operation : "DELETE" };
page.open('http://domainB/id' , setting, function(status){
//do some stuff
});

0 个答案:

没有答案