Nao consigo acessar os dados da APi que me foi passada via app
Erro:Response for preflight has invalid HTTP status code 405
Codigo:
getUsers(code: string) {
this.headers = new Headers();
this.headers.set('Accept', 'application/ json; charset = utf - 8')
this.headers.append('Content-Type', 'application/ json; charset = utf - 8')
this.headers.append('Access-Control-Allow-Origin')
return new Promise(resolve => {
console.log(
code);
this.http.post(this.apiUrl, code, { headers: this.headers })
.map(res => res.json())
.subscribe(data => {
data = data;
resolve(data);
});