我正在从UI调用REST API,但出现错误
错误代码:404消息:https://localhost:5001/api/SampleDataSource/GetDetails的Http错误响应:404 OK
query(): Observable < object > {
private headers = new HttpHeaders();
this.headers = this.headers.append('X-Requested-With', 'XMLHttpRequest');
this.headers = this.headers.append('Content-Type', 'application/json');
this.headers = this.headers.append('Accept', 'application/json');
this.headers = this.headers.append('Access-Control-Allow-Headers', 'Content-Type');
return this.http.get(this.BASE_URL, { headers: this.headers }).pipe(catchError(this.handleError));
}