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

JSON body returned as string instead of JSON #2

Open
johanforssell opened this issue Feb 12, 2016 · 1 comment
Open

JSON body returned as string instead of JSON #2

johanforssell opened this issue Feb 12, 2016 · 1 comment

Comments

@johanforssell
Copy link

Using the latest 0.6.2 from npmjs.com!

makeProxiedCall() have multiple calls to res.json(body);.

For some reason this is not working correctly for me - I'm getting back the json data as a string. If I json-parse the body before using it I get correct data. Like so:

res.json(JSON.parse(body));
@bdefore
Copy link
Owner

bdefore commented Feb 16, 2016

@johanforssell You raise a good point, and perhaps it is appropriate for express-jwt-proxy to always parse API responses before handing them off. Up to now I've been receiving them as strings and parsing them in my superagent responses. I believe a few others have encountered this as well.

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