Jul 28, 2017 · 1 min read
Hi, when I try to switch Http with HttpClient in the constructor, I realized that the HttpClient cant take RequestOptions as a parameter. I can’t find documentation on this. Do you know where I should look?
Part of my code:
let requestOptions = new RequestOptions();
requestOptions.search = params; //params is of type URLSearchParams
this.http.get(AppSettings.API_ENDPOINT, requestOptions ).map(res => res.json()).share();
Error:
Argument of type ‘RequestOptions’ is not assignable to parameter of type ‘{headers?: HTtpHeaders; observe?:”body”; ….
