(I am totally new to Restlet client and Server scripting)
I am trying to get JSON Data from response body of the Restlet client using below code but I could not get that
var http = require('http');
var options = {
host: 'staging.api.pearson.com',
port: 80,
path: '/sc-api/apis/content/urn:pearson:manifestation:db7eac5b-8f65-49dc-97bc-d0f5e824f135'
};
http.get(options, function(res) {
console.log("Got response: " + res.statusCode);
res.on("data", function(chunk) {
console.log("BODY: " + chunk);
});
}).on('error', function(e) {
console.log("Got error: " + e.message);
});
Getting the below output:
But when using the Restlet client GUI, can able download the response BODY Json
Adding Environments details:
Browser Snapshot:
Kindly anybody suggest any way to do
(I am totally new to Restlet client and Server scripting)
Thanks