-
Notifications
You must be signed in to change notification settings - Fork 26.5k
Closed
Description
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
When we use:
let header = new HttpHeaders();
header.append('abc','22');
console.log(header.get('abc'));
In console we get null
Expected behavior
We should see 22 in console
Minimal reproduction of the problem with instructions
Plunker gives error when I import HttpClientModule. But here are the steps using angular cli
- ng new httptest -si
- cd httptest
- edit package.json
- replace all old angular version to current angular version which is 4.4.0-RC.0
- ssave
- npm install
- edit app.module.ts
- import { HttpClientModule } from '@angular/common/http';
- imports:[HttpClientModule] //Added into existing import
- edit app.component.ts
import { HttpClient, HttpHeaders } from '@angular/common/http';
export class AppComponent {
title = 'app';
constructor(private http:HttpClient) {
this.displayHeaders();
}
displayHeaders(){
let header = new HttpHeaders();
header.append('abc','22');
console.log(header.get('abc'));
}
}
9. ng serve -o
10. Check the console for output
What is the motivation / use case for changing the behavior?
no change in expected behavior. We need exact same behavior as 4.3.4
Environment
Angular version: 4.4.0-RC.0
yes it is.
Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: 8.0.0
- Platform: Windows
Others:
abdel-ships-it, karol-may, hadirsa, AhmedBHameed, fellipegpbotelho and 13 more
Metadata
Metadata
Assignees
Labels
No labels