angular-cn/packages/common/http
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
..
src feat(common): accept object map for HttpClient headers & params (#18490) 2017-08-29 17:18:02 -07:00
test feat(common): accept object map for HttpClient headers & params (#18490) 2017-08-29 17:18:02 -07:00
testing feat: deprecate @angular/http in favor of @angular/common/http (#18906) 2017-08-28 18:46:58 -05:00
index.ts feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00
package.json feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00
public_api.ts fix(common): rename HttpXsrfModule to HttpClientXsrfModule 2017-07-14 12:40:52 -07:00
rollup.config.js fix(common): fix improper packaging for @angular/common/http (#18613) 2017-08-29 17:12:10 -07:00
tsconfig-build.json feat(common): new HttpClient API 2017-07-07 12:09:32 -07:00