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
What you have here is actually not related to the response but instead you get a 400 status code from your API. That means that the JSON in your request is wrong. Please double check your data variable.
I have an API which returns as response
'{}'
when a method DELETE worked.However when using the option
json: true
, I get the following error:'400 - {"err":"Invalid json","ECODE":"JSON_001"}'
The option is supposed to parse the response body as JSON so I should get an empty object as response
{}
.I believe when JSON parsing
'{}'
returns{}
which is valid.Why is this happening?
The text was updated successfully, but these errors were encountered: