Angular 4 HttpClient Query Parameters

后端 未结 8 984
耶瑟儿~
耶瑟儿~ 2020-11-29 16:00

I have been looking for a way to pass query parameters into an API call with the new HttpClientModule\'s HttpClient and have yet to find a solution

8条回答
  •  悲哀的现实
    2020-11-29 16:50

    search property of type URLSearchParams in RequestOptions class is deprecated in angular 4. Instead, you should use params property of type URLSearchParams.

提交回复
热议问题