I am trying to implement three methods controller
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
public IEnumerable<string> Get(int id)
{
return new string[] { "sa1", "sa2" };
}
[HttpGet]
public IEnumerable<string> password()
{
return new string[] { "password", "password" };
}
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{id}",
defaults: new { id = RouteParameter.Optional }
);
But When i try to call http://localhost:49365/api/mycontrollername/password
it's always showing The request is invalid.