Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
While trying to call the POST it is hitting the GET. I checked all the routing configuration and everything looks OK. Has anyone faced such issue before?
Hi Krishna,
Can you post up your controller code for us to see what's going on? There could be a number of things causing this.
Louis
public class AccpacImportController : ApiController { private readonly IAccpacImportService _accpacImportService;
public AccpacImportController() { _accpacImportService = new AccpacImportService(); } [HttpGet] [Route("FooBar2")] public IHttpActionResult FooBar2Get() { return Ok(); } [HttpPost] [Route("FooBar2")] public IHttpActionResult FooBar2() { return Ok(); } [HttpPost] [Route("FooBar")] public IHttpActionResult FooBar() { return Ok(); } }
All the route config seems to be OK.
I tried by inheriting "UmbracoApiController" and it is working as expected. (request made from Postman) and Below code...
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Web Api Post not working
While trying to call the POST it is hitting the GET. I checked all the routing configuration and everything looks OK. Has anyone faced such issue before?
Hi Krishna,
Can you post up your controller code for us to see what's going on? There could be a number of things causing this.
Louis
public class AccpacImportController : ApiController { private readonly IAccpacImportService _accpacImportService;
All the route config seems to be OK.
I tried by inheriting "UmbracoApiController" and it is working as expected. (request made from Postman) and Below code...
is working on a reply...