Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
In vanilla Web Api, I can have something like:
// GET api/products
public IEnumerable<Product> Get()
I am creating a controller (implementing UmbracoApiController) in v7 and would like to have a default action method for Get() requests on that controlller.
This doesn't seem to work, I have to call /api/products/get to get anything back from the controller.
Are default Get methods supported in Umbraco?
I tried myself, but it looks like that won't work and you need to go to the full url.
Here are some more examples: http://our.umbraco.org/projects/developer-tools/hybrid-framework/hybrid-framework/47815-Using-Ajax-with-the-framework?p=0#comment172879
Thanks for the tips, Jeroen!
I'm going to have a play with some custom routing at the weekend and see what I can come up with.
In the original post you mention that you try to acces your API with the following url : /api/products/get
This should be : /umbraco/api/products/get
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted