angular-cn/packages/common/http/test
Alex Rickabaugh 1b1d5f10a1 feat(common): accept object map for HttpClient headers & params (#18490)
Today, constructing a new GET request with headers looks like:

const headers = new HttpHeaders({
  'My-Header': 'header value',
});
http.get('/url', {headers}).subscribe(...);

This indirection is unnecessary. It'd be more ergonomic to write:

http.get('/url', {headers: {'My-Header': 'header value'}}).subscribe(...);

This commit allows that new syntax, both for HttpHeaders and HttpParams.
In the HttpParams case it also allows construction of HttpParams with a map.

PR Close #18490
2017-08-29 17:18:02 -07:00
..
client_spec.ts feat(common): accept object map for HttpClient headers & params (#18490) 2017-08-29 17:18:02 -07:00
headers_spec.ts feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00
jsonp_mock.ts feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00
jsonp_spec.ts build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
module_spec.ts feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00
params_spec.ts build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
request_spec.ts feat(common): two missing features in HttpClient (#17996) 2017-07-07 14:56:36 -07:00
response_spec.ts feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00
xhr_mock.ts feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00
xhr_spec.ts build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00
xsrf_spec.ts build: enable TSLint on the packages folder 2017-07-31 15:47:57 -07:00