相关疑难解决方法(0)

在哪里将 HttpClient 的 responseType 设置为 http GET 角度

我有一个向我的后端发出 http 调用的服务:

exportSubs(param: Param): Observable<Sub[]> {
    return this.http.get<Sub[]>(
      `${environment.apiBaseUrl}/blah`,
      {headers: this.httpUtil.getReqHeaders})
      .catch(error => this.httpUtil.handleError(error));
  }
Run Code Online (Sandbox Code Playgroud)

我在哪里设置 responseType?

angular

1
推荐指数
1
解决办法
7876
查看次数

标签 统计

angular ×1