In an asp.net code I'm working on, it has the following code in controller class to handle GET request.
public class NotificationsController : ApiController
{
public async Task<HttpResponseMessage> Get([FromUri]string message)
{
.....
In webapiconfig file, the route is mapped as
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
When I make GET request, the GET handler isn't even called. What am I missing here?
EDIT :
My GET request looks like : domain name here /api/notifications?message="hello"