Good morning,
I'm a little desperate because I'm unable to perform an UPDATE through an API. The request gives me an error:
403 by Invalid CORS request.
My service:
private urlApi= 'http://localhost:8080/api';
updateIt(id: string, lang: string, body: Object) {
let bodyString = JSON.stringify(body);
let headers = new Headers({ 'Accept': '*/*' });
let options = new RequestOptions({ headers: headers });
return this.http.post(this.copiesUrl + "/" + id + "/lang/" + lang, body, options)
.map((res:Response) => res.json())
.subscribe(
data => console.log('Success update ', data),
error => console.error('Error: ${error}')
);
}
I have tried to put a chrome extension for the CORS theme and in the "Intercepted URLs or URL patterns" field I have placed *://*/*
Highlight that to make requests for consultation I'm not having any problem.