Forum Discussion
c0d3ninja
Aug 23, 2024Copper Contributor
How to post using jquery to asp.net core api
I'm trying to develop a simple app to post to an api using jquery. I've tried multiple online suggestions and none of them work. I've even tried some of the AI code without success.
I can get GET to reply back with data but POST is just not working. Going on my 3rd day on this. Please help.
This is my api code:
This is what I'm trying.
Thanks for your time.
1 Reply
- ardaakkayaCopper ContributorHi,
It seems like you are returning a Redirect result and trying to parse it like JSON. You should return a JSON to get results. Or you can use http status code for verifying process is done.