You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
because our restful server replies with a space between chars ';' and 'charset ....':
"application/json; charset=utf-8"
but your code expects:
"application/json;charset=utf-8"
In general your code does not support spaces in the 'Content-Type' response header.
The text was updated successfully, but these errors were encountered:
Hi
You don't need to modify the code to achive what you want because you can set a custom content-type definition for JSON or XML when you initialize the client.
I'm having the same issue, and I made the same modification to my version of the code.
I'd suggest using .indexOf('application/json') > -1 in your code, rather than doing an exact comparison. This method will support more implementations by default.
We have modified this part of your code (node-rest-client.js):
296 "isJSON":function(content){
297 content = content.replace(' ', '');
because our restful server replies with a space between chars ';' and 'charset ....':
"application/json; charset=utf-8"
but your code expects:
"application/json;charset=utf-8"
In general your code does not support spaces in the 'Content-Type' response header.
The text was updated successfully, but these errors were encountered: