-1
HttpHeadersでHttpClient経由でHTTPリクエストにヘッダーを使用する方法を理解しようとしています。角5のHttpHeadersにヘッダーを設定する方法
const headers = new HttpHeaders();
headers.append('foo', 'bar');
headers.set('foo', 'bar');
console.log(headers.get('foo')) // null
それだけでこのように動作します:
const headers = new HttpHeaders().set('foo', 'bar');
console.log(headers.get('foo')) // bar
ヘッダを追加するための特別な方法はありますか?それともバグですか?
[これをチェック](https://github.com/angular/angular/issues/19044) –