meta-magic / amexio.github.io

Amexio is a rich set of Angular 7 (170+) components powered by HTML5 & CSS3 for Responsive Design and with 80+ Material Design Themes, UI Components, Charts, Gauges, Data Point Widgets, Dashboards. Amexio is completely Open Sourced and Free. It's based on Apache 2 License. You can use it in your production grade work today at no cost or no obligation.
http://www.amexio.tech
Apache License 2.0
166 stars 72 forks source link

Data Grid, post call should accept data body #57

Closed bhanukumar04 closed 6 years ago

bhanukumar04 commented 6 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[X ] Feature request
[ ] Documentation issue or request
[ ] Support request

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


Angular version: 5.2.0


Browser:
- [ X] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [X ] IE version XX
- [X ] Edge version XX

For Tooling issues:
- Node version: 9.X
- Platform:  Windows            
pratikthecook commented 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!.

arafkarsh commented 6 years ago

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

bhanukumar04 commented 6 years ago

:thumbsup: