My Example Code:
var Client = require('node-rest-client').Client;var client = new Client();var selectedText = "Test"var args = {headers: { "Accept": "application/json" }};var Url = "https://communities.vmware.com/api/core/v3/search/contents?count=1&filter=search(" + selectedText + ")&sort=relevanceDesc&returnScore=true&filter=type(discussion)"// direct wayclient.get(Url, args, function (data, response) {// parsed response body as js objectconsole.log(data);// raw responseconsole.log(response);}); `
Hello,
I try to use node-rest-client for JIVE API. JIVE Uses JSON Hijacking prevention: https://community.jivesoftware.com/community/developer/blog/2015/06/29/throw-allowillegalresourcecall-to-the-curb-is-true
An Idea how to handle the JSON Paring error?
My Example Code:
}); `
var Client = require('node-rest-client').Client;
var client = new Client();
var selectedText = "Test"
var args = {
headers: { "Accept": "application/json" }
};
var Url = "https://communities.vmware.com/api/core/v3/search/contents?count=1&filter=search(" + selectedText + ")&sort=relevanceDesc&returnScore=true&filter=type(discussion)"
// direct way
client.get(Url, args, function (data, response) {
// parsed response body as js object
console.log(data);
// raw response
console.log(response);