From 1d5c171890cf5acf8d28409fabff6767933c1130 Mon Sep 17 00:00:00 2001 From: Prabhat Khera Date: Mon, 3 Nov 2014 11:52:37 +0530 Subject: [PATCH] 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. --- _posts/api/webpage/method/2000-01-01-open.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_posts/api/webpage/method/2000-01-01-open.md b/_posts/api/webpage/method/2000-01-01-open.md index ab22d3ac..0342c50b 100644 --- a/_posts/api/webpage/method/2000-01-01-open.md +++ b/_posts/api/webpage/method/2000-01-01-open.md @@ -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) {