Just a quick question regarding the AppService functionality where dynamic api's are generated off the method names.
Is it possible to make it more RESTful?
For example if i have a PhoneAppService that has:
GetPhone() CreatePhone()
would be nice for the endpoints to be more restful:
GET: /api/services/app/Phone POST: /api/services/app/Phone
rather than:
GET: /api/services/app/Phone/GetPhone POST: /api/services/app/Phone/PostPhone
This is on the .net core app also, is there a way to do this?
1 Answer(s)
-
0
Hi,
You can do it by creating a DynamicApiControllerBuilder like this one <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/master/src/Abp.Web.Api/WebApi/Controllers/Dynamic/Builders/DynamicApiControllerBuilder.cs">https://github.com/aspnetboilerplate/as ... Builder.cs</a>.
But ABP generates client side javascript code for calling these services and you need to change it as well.