120bdeecdc
Previously, an interceptor attempting to inject HttpClient directly would receive a circular dependency error, as HttpClient was constructed via a factory which injected the interceptor instances. Users want to inject HttpClient into interceptors to make supporting requests (ex: to retrieve an authentication token). Currently this is only possible by injecting the Injector and using it to resolve HttpClient at request time. Either HttpClient or the user has to deal specially with the circular dependency. This change moves that responsibility into HttpClient itself. By utilizing a new class HttpInterceptingHandler which lazily loads the set of interceptors at request time, it's possible to inject HttpClient directly into interceptors as construction of HttpClient no longer requires the interceptor chain to be constructed. Fixes #18224. PR Close #19809 |
||
---|---|---|
.. | ||
client_spec.ts | ||
headers_spec.ts | ||
jsonp_mock.ts | ||
jsonp_spec.ts | ||
module_spec.ts | ||
params_spec.ts | ||
request_spec.ts | ||
response_spec.ts | ||
xhr_mock.ts | ||
xhr_spec.ts | ||
xsrf_spec.ts |