mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
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
|
||
|---|---|---|
| .. | ||
| animations | ||
| common | ||
| compiler | ||
| core | ||
| forms | ||
| http | ||
| platform-browser | ||
| platform-browser-dynamic | ||
| platform-server | ||
| platform-webworker | ||
| platform-webworker-dynamic | ||
| router | ||
| upgrade | ||