0

Rest API works in Google Rest Client but in AngularJS their is a CORS issue. Why is that?

0

1 Answer 1

0

CORS doesn't apply to the client because it isn't try to do the request from another website - it's doing it from your computer. But when you do it on your site using AngularJS - then you encounter the CORS issue.

Sign up to request clarification or add additional context in comments.

7 Comments

How is Google Rest API sending their request to avoid the CORS issue? I've read so many different ways to try and solve the issue but not a standard one so I tried it in Goggle Rest API and that's when i saw it worked for them.
Sorry, just to make sure I'm on the right page with you - the Google REST client you are using is the Chrome Extension? Or something else?
Chrome Extensions are allowed to send and received data from remote servers. developer.chrome.com/extensions/xhr
Gotcha, that makes me feel a lot better. Their needs to be a standard practice to this CORS issue because it waste a lot of development time.
Well - forgive me if I'm mistaken but I think maybe you're not quite seeing the difference between using the Chrome extension and trying to do the same call from inside a website. There's a big difference in the sense that CORS is meant to prevent REST calls between websites - but when you use the Chrome extension, you're making a call between your computer and a website (as opposed to two websites).
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.