But the problem is i can’t store a large HTML code with styles in it, I’m getting this Syntax Error:
SyntaxError: Unexpected token m in JSON at position 39<br> at JSON.parse (<anonymous>)<br> at parse (/snapshot/build/node_modules/body-parser/lib/types/json.js:89:19)<br> at /snapshot/build/node_modules/body-parser/lib/read.
For example if i’m storing this HTML in a variable and send the request i will get the Error above:
Yeah that’s my first guess too it looks like in the server side i just thought it was something with parsing in postman because i noticed that i can’t store a large string with too much spaces or indents.
Status Code is 400 Bad Request
Unfortunately i can’t share the API specs since it’s not public, anyway thanks for the response @michaelderekjones
The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
Therefore, its telling you that it doesn’t like what is being sent.
Although I would expect the server response to be a bit more descriptive than that. It looks like it is parsing the message to JSON, and then failing.
It’s failing at the “m” which I’m taking to be the “margin-top” element.
You might want to send an escape character with that string as you have quotes which might be the cause of the parsing error.