mirror of https://github.com/vitalif/phantomjs
It is not posting data untill we stringify JSON data
Example is not working until we stringify json data. I have phantomjs@1.9.7-8 installed. I tested it with a node server and posted data through phantomjs but after so many try, it just worked with JSON.stringify.gh-pages
parent
25b627de18
commit
1d5c171890
|
@ -54,10 +54,10 @@ var settings = {
|
|||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
data: {
|
||||
data: JSON.stringify({
|
||||
some: "data",
|
||||
another: ["custom", "data"]
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
page.open('http://your.custom.api', settings, function(status) {
|
||||
|
|
Loading…
Reference in New Issue