错误:预检响应中的Access-Control-Allow-Headers不允许使用请求标头字段内容类型。
这是我的代码:
import { Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import 'rxjs/add/operator/map';
@Injectable()
export class JobSearch{
constructor(private _http: Http){}
private _jobListUrl = 'https://api.shiftjobapp.com/api/v3/job_list?token=xxxx';
private _jobDetailsUrl = 'https://api.shiftjobapp.com/api/v3/job_detailed?token=xxxx';
getJobs(){
return this._http.post(this._jobListUrl)
.map((response: Response) => response.json());
}
getJobDetails(){
return this._http.post(this._jobDetailsUrl, {job_id: 1390})
.map((response: Response) => console.log(response.json()));
}
}