📜  将标头添加到 httpclient angular - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:18.656000             🧑  作者: Mango

代码示例1
import { HttpHeaders } from '@angular/common/http';

...
this.http.post(BACKEND_URL, postData, 
        {headers: new HttpHeaders({your-headers})})
      .subscribe(responseData => {
        ...
      });