mirkoperillo / resting

A visual HTTP client browser extension
https://resting.owlcode.eu/
GNU General Public License v3.0
27 stars 12 forks source link

Match body data b/w resting and API response #177

Closed nikhilraojl closed 1 year ago

nikhilraojl commented 1 year ago

Closes #175

As per jQuery docs, jqXHR object only contains responseJSON property if there is correct content-type header. https://api.jquery.com/jQuery.ajax/#jqXHR -> Data Types.

In this PR, I have handled the error case by falling back to responseText object instead of constructing {"status": ..., "error": ...} object which was causing confusion