My problem is in my api Angular 6. Once the interceptors are created when send POST request these become in OPTIONS request.
What is the problem ?
This is the code of one Service
import { Injectable } from '@angular/core';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { AppConfig } from '../app.config';
import { Perfil } from '../Entities/Perfil';
// import { Http } from '@angular/http';
@Injectable({
providedIn: 'root'
})
export class UsuariosService {
constructor(private http: HttpClient, private config: AppConfig) { }
private per = new Perfil(1);
getPerfiles() {
return this.http.post(this.config.apiUrl + 'perfiles/Buscar/', this.per);
}
}
this image will help us in this problem:
Regards!