0

When I import:

import { HttpClientModule } from '@angular/common/http';
import { HttpModule } from '@angular/http';

And then:

constructor(private http: Http, private httpClient: HttpClient) {}

this.httpClient.post(...
this.http.post(...

In this case, I use Microsoft Identity, which relies on cookies for authentication.

Could that cause problems if I post, for example, the login in one way and the register in another?

Grant Miller
  • 27,532
  • 16
  • 147
  • 165
Nolan
  • 1
  • 3

1 Answers1

0

Why do you want to use old, deprecated Http when you can use HttpClient?
Difference between HTTP and HTTPClient in angular 4?

Eluzive
  • 99
  • 6
  • I started writing my application the old way and discovered the new one later, so i wonder if i should edit all or if it does not matter? – Nolan Oct 01 '18 at 17:58
  • I would suggest you should edit this because when something is deprecated there is possibility that it will be removed in some future release. And I don't think it's a lot of work - of course depends on your project. But... it could still work. Depends on you. – Eluzive Oct 01 '18 at 18:04