1. The URL is wrong and you got a 404 page
A typo in the path, a missing /api prefix or a relative URL that resolves somewhere else all return the server's HTML 404 page. Open the request in your browser's Network tab and look at the Response, if it starts with <!DOCTYPE html> you're hitting the wrong address.