ultimate-angular-starter-seed icon indicating copy to clipboard operation
ultimate-angular-starter-seed copied to clipboard

CORS issue with API of jsonplaceholders

Open Vortilion opened this issue 6 years ago • 0 comments

Hi,

it seems that defining the API to the jsonplaceholder-URL you do in Lab 5 via

var API = '//jsonplaceholder.typicode.com/todos/';

Will cause CORS errors in chrome when doing the PUT-Request. If I change it to

var API = 'https://jsonplaceholder.typicode.com/todos/';

it works perfectly. It still does the OPTIONS-Request before PUT (which it doesn't in your video for some reason, I think it should, because it is always triggered when doing sth. other than a GET, HEAD or POST Request), but it works. Just as a note.

Vortilion avatar Jul 31 '18 08:07 Vortilion