📌  相关文章
📜  模块 '"@angular common http"' 没有导出的成员 'RequestOptions' - TypeScript 代码示例

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

代码示例1
//RequestOptions is deprecated if you use @angular/common/http
//try this solution instead:
import { HttpHeaders } from '@angular/common/http';
...
const httpOptions = {
        headers: new HttpHeaders({
          'Content-Type':  'application/json',
          'Authorization': environment.key
          })
        };
...