Closed bhanukumar04 closed 6 years ago
You could call your post method directly with the body and assign it to [data]
attribute. We will be adding a attribute [payload]
to future version release. Thanks for your feedback!.
Dear Bhanu, If you would like to get the release emails and feature announcements. Please subscribe to Amexio Mailing list. Click on the subscribe option (at the bottom of the Home page) https://www.amexio.tech
:thumbsup:
I'm submitting a...
Current behavior
we are not able to pass any data to back end even though the method call type is POST, it just behaves like a get call method.
Expected behavior
when using data grid , post method call should be able to send body data instead of empty body. common.data.service.ts:
fetchData(serviceUrl: string, methodType: string): Observable {
15 const requestJson = {};
16 const headers = new Headers({ 'Content-Type': 'application/json;charset=UTF-8' });
17 const options = new RequestOptions({headers : headers, method : methodType});
18 if (methodType == 'post') {
19 return this._http.post(serviceUrl, requestJson, options);
20 }else if (methodType == 'get') {
21 return this._http.get(serviceUrl, options);
22 }
23 }
What is the motivation / use case for changing the behavior?
POST data should allow us to send body to back end service.
Environment