-
Notifications
You must be signed in to change notification settings - Fork 0
Home
txgz999 edited this page Mar 20, 2020
·
8 revisions
The following articles explains attribute routing well
We often use the RoutePrefix attribute at the controller level with Route attribute at the method level.
There is a convention to detect the http verb a method support based on method name:
// POST: api/fcm/SendMessage
[Route("sendmessage")]
public async Task<IHttpActionResult> PostMessage(but we have have complete custom method name with a http verb attribute as follows:
// POST: api/fcm/SendMessage
[Route("sendmessage")]
[HttpPost]
public async Task<IHttpActionResult> SendMessage(