JSON body returned as string instead of JSON
johanforssell opened this issue · 1 comments
johanforssell commented
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 commented
@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.