angular-cn/packages/common/http/test
Alex Rickabaugh 120bdeecdc fix(common): allow HttpInterceptors to inject HttpClient (#19809)
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
2018-01-29 16:12:32 -08:00
..
client_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
headers_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
jsonp_mock.ts refactor(core): Removed readonly getters and changed to readonly (#19842) 2017-12-08 10:24:19 -08:00
jsonp_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
module_spec.ts fix(common): allow HttpInterceptors to inject HttpClient (#19809) 2018-01-29 16:12:32 -08:00
params_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
request_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
response_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
xhr_mock.ts fix(common): fix XSSI prefix stripping by using JSON.parse always (#18466) 2017-08-29 17:18:54 -07:00
xhr_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00
xsrf_spec.ts build: remove `main()` from specs (#21053) 2017-12-22 13:10:51 -08:00