In HttpClientModule, is there a method to pass headers and params to get request.
import { HttpHeaders, HttpParams, HttpClient } from @angular/common/http
As of Angular 5.0.0-beta.6 (2017-09-03), you can now pass in both headers and parameters using the below syntax:
const httpOptions = {
headers: { 'Content-Type': 'application/json' },
params: {'include': 'somethingCool'}
};
this.http.get('http://www.example.org', httpOptions);
Source: https://github.com/angular/angular/pull/18490