Skip to content

Instantly share code, notes, and snippets.

@wsrzx
Created January 25, 2016 22:17
Show Gist options
  • Save wsrzx/22669660832b7134d19a to your computer and use it in GitHub Desktop.
Save wsrzx/22669660832b7134d19a to your computer and use it in GitHub Desktop.
Multiple HttpPost method in Web API controller
public class MyController : ApiController
{
[HttpPost]
[ActionName("myfirstroute")]
public string MyFirstPostMethod(JObject userData)
{
// do your thing
}
[HttpPost]
[ActionName("mysecondrout")]
public string MySecondPostMethod(JObject userData)
{
// do your thing
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment