2016-07-06 69 views
1

我是Angular 2的新手,我的應用程序可以在IE和Chrome中正常工作。但是,當我嘗試使用Firefox時,調用我的PHP腳本的發佈請求在Firefox中不起作用。Angular 2與Firefox的POST

postApplicant(newApplicant: Applicant): Observable<string> { 
     let body = `firstName=${newApplicant.firstName}&lastName=${newApplicant.lastName}`; 
     let headers = new Headers({ 'Content-Type': 'application/x-www-form-urlencoded' }); 
      headers.append('Accept', 'q=0.8;application/json;q=0.9'); 
     let options = new RequestOptions({ headers: headers }); 

     return this.http.post(this.emailUrl, body, options) 
         .map(res => <string> res.json()) 
         .catch(this.handleError) 
} 
+0

請,更準確,發佈你得到的錯誤 – 0x13a

+0

不清楚問題,但可以檢查參考http://stackoverflow.com/a/372​​90319/5868331 – mayur

回答