This is my code segment for fetching data from REST using angular HTTP, I can not pass any body inside the request.
this.http.get('paymentadvicelist').map((res: Response) => {
return res.json();
})
This is my code segment for fetching data from REST using angular HTTP, I can not pass any body inside the request.
this.http.get('paymentadvicelist').map((res: Response) => {
return res.json();
})
It depends on what type your "http" member is.
If you use the (newer) HttpClient API then you can use the httpClient.request() method (like httpClient.request("GET", url, {body: theRequestBody}).
If you use the older Http class (which is deprecated since angular 4.3) then you can set the request body in the request options, see the API documentation here.