Angular 4/5 HttpClient: Argument of type string is not assignable to 'body'

前端 未结 4 1472
醉酒成梦
醉酒成梦 2020-11-30 05:58

The Angular docs say:

The response body doesn\'t return all the data you may need. Sometimes servers return special headers or status codes to indic

4条回答
  •  一个人的身影
    2020-11-30 06:29

    import { HttpHeaders, HttpParams } from '@angular/common/http';
    export interface IRequestOptions {
        headers?: HttpHeaders | { [header: string]: string | string[]; };
        observe: "response"; 
        params?: HttpParams | { [param: string]: string | string[]; };
        reportProgress?: boolean; 
        responseType?: "json";
        withCredentials?: boolean; 
    }
    

提交回复
热议问题