In addition to all the answers, if you happen to receive in response text/html
while you've expected something else (i.e. application/json
), it may suggest that an error occurred on the server side (say 404) and the error page was returned instead of your data.
So it happened in my case. Hope it will save somebody's time.