Blog by Sasha twitter linkedin

June 16, 2022

Url.Action() saves lives

 You find yourself in need of finding out what the route path is to hit an action on a SitecoreController annotated with [HttpPost].


@Url.Action("ActionName","ControllerNameWithoutTheWordContollerAtTheEnd") to the rescue! Drop it somewhere (I put it in my view) and it will resolve it with the API path that you can use with Postman to test if the endpoint is hittable.




No comments:

Post a Comment