- Home
- Forum
- Angular - EJ 2
- How to bind remote data for an API of POST type
How to bind remote data for an API of POST type
Team,
Attachment: remote_data_bind_8c9c171d.zip
I went through documentation of binding remote data with syncfusion dropdownlist.
I have an existing api of post type (and not get as used in demo).
How to can I set the service url in that case along with post body?
Demo attached.
Attachment: remote_data_bind_8c9c171d.zip
SIGN IN To post a reply.
4 Replies
1 reply marked as answer
TU
Tuariq
September 15, 2020 11:57 AM UTC
Team,
Also which type of adapter to use?
I need to bind with a POST api accepting a body and returning a JSON data
Thanks
Tuariq
JM
Jeyanth Muthu Pratheeban Sankara Subramanian
Syncfusion Team
September 16, 2020 04:42 PM UTC
Hi Tuariq,
Greetings from Syncfusion support.
We have checked your query. We suggest you to use WebApi adaptor to achieve your requirement. Please find the sample below.
|
public data: DataManager = new DataManager({
url: 'https://ej2services.syncfusion.com/production/web-services/api/Employees',
adaptor: new WebApiAdaptor,
crossDomain: true
});
|
Kindly check the sample and get back to us if you need any further assistance on this.
Regards,
Jeyanth.
TU
Tuariq
September 17, 2020 04:41 AM UTC
Jeyanth,
Thanks for the response.
My problem was how to use a web api that is of POST method.
In the solution provided, the api used in demo is still of GET.
Could you please provide a sample of using POST method type API which accepts a request body in request?
Thanks
Tuariq
PM
Ponmani Murugaiyan
Syncfusion Team
September 22, 2020 01:49 PM UTC
Hi Tuariq,
Thanks for the patience.
We have prepared sample as per your requirement. Please find the frontend and backend sample below for your reference.
Frontend sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Frontend724026137
Backend sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/WebApplication1-1749573033
Kindly check with the above sample. Please get back us if you need further assistance.
Regards,
Ponmani M
Marked as answer
SIGN IN To post a reply.
- 4 Replies
- 3 Participants
- Marked answer
-
TU Tuariq
- Sep 15, 2020 11:40 AM UTC
- Sep 22, 2020 01:49 PM UTC