0

Im trying make a http request with GET mephod passing params, but it's not working, request is calling the endpoint but not passing search params

let params = new URLSearchParams();
params.set('dt_from', '2017-09-03');
params.set('dt_to', '2017-09-03');
return this.http.get(environment.apiHost + 'reports/report01', {search: params})
rayashi
  • 1,721
  • 3
  • 20
  • 28

1 Answers1

3

I guess you have forgotten to add import for URLSearchParams

import { URLSearchParams } from '@angular/http';
Rahul Singh
  • 19,030
  • 11
  • 64
  • 86