📜  角度转换响应到 json - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:24.790000             🧑  作者: Mango

代码示例1
getSomeDataFromSomeAPI(){
  //res.json() does the trick, .json() function belongs to Response Object
  return this.http.get("https://someApi.com/api/getData")
  .map(res => res.json()).toPromise();
}