【发布时间】:2016-09-05 03:31:09
【问题描述】:
有可能在 RC4 中扩展 Http 或 BaseRequestOptions 并将默认标头添加到所有 http 请求。 喜欢这里How to set default HTTP header in Angular2? 如何在 RC5 中做到这一点?
在 http.d.ts 第 163 行找到 export declare function httpFactory(xhrBackend: XHRBackend, requestOptions: RequestOptions): Http;。也许它可以提供帮助。
【问题讨论】:
标签: angular