AJAX call question

I got a question and I have not any idea what the … is the correct answer?

You’re trying to call an API from a browser client. Calling the API directly from a web browser by entering the URL in the address bar is successful, however, it fails when attempting to retrieve data from the same API route via an AJAX call.
What could the problem be?
How would you go about troubleshooting the issue?
How would you resolve the issue? More than one resolution is encouraged.

I cannot to imagine the above situation. I meet before the opposite. When I called AJAX from the TwitcTV API. The URL in the address bar is not work because need to attach also header information. Anyone has an idea?

This question presumes that server can differentiate between requests from address bar vs. requests from the script, which sounds like bollocks to me :slight_smile:

I would bet that I can fetch anything via AJAX what my browser can fetch from address bar

Yes, in first look I also think the same… I think so the question is about the cors policy… If your browser in the same origin and you enter the url to the address bar, you see the data bat from AJAX not because the request will be refused… Maybe this is the solution?