I can't figure out how to write the method signature for a REST(ish) AJAX call in Aspnet WebAPI.
My route is recognised but I get a "No HTTP resource was found that matches the request URI..."
I try to do a REST(ish) call like
http://mysite.com/api/Project/42/Children
and my idea is to have the server return all children of project 42.
My route is:
config.Routes.MapHttpRoute(
name: "DefaultApiWithAction",
routeTemplate: "api/{controller}/{id}/Children",
defaults: new { action="Children"}
);
and my method signature is:
public class ProjectController : ApiController {
[HttpGet]
public IEnumerable<Project> Children(int projectID) {
...
Why isn't my method recognised?
I am also not sure I am doing the right "restish" thing here.