【发布时间】:2018-03-26 17:18:54
【问题描述】:
谁能告诉我为什么我在从 http.post 收到回复时没有收到任何标题?
this.http.post<Response>(url, body).subscribe((res: Response) => console.log(res.headers));
res.headers 记录“未定义”,但在 Chrome DevTools 中,响应显示我正在寻找的标头。
旁注:我确实将 Access-Control-Expose-Headers 设置为我想要公开的标题。
知道为什么会这样吗?
【问题讨论】:
标签: node.js angular rest observable