Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle JSON Hijacking prevention #189

Open
vMarkusK opened this issue Apr 3, 2018 · 1 comment
Open

Handle JSON Hijacking prevention #189

vMarkusK opened this issue Apr 3, 2018 · 1 comment

Comments

@vMarkusK
Copy link

vMarkusK commented Apr 3, 2018

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); }); `

@M1kep
Copy link

M1kep commented Jun 9, 2018

It looks like you would need to implement a response parser. It looks like there is some explanation/example in the readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants