Reputation: 1863
Let's have a form, where I have a couple of selects. I need to fill them with options provided from server.
But a RESTful API should only have methods for
There's no place for retrieving some other data. I guess I should create these 4 method for each select options, but that seems to me like a overkill.
Upvotes: 3
Views: 1217
Reputation: 787
Your form data lists can be orthogonal to each other but your form must obviously put them together in a business context. The object that you would GET or PUT or POST or DELETE would be your business object that only has a property for each of the selects. You can GET the lists populating your selects separately.
You can have the 4 methods for each of those lists only if you wish to provide those services via REST as opposed to maintaining them directly (using SQL). Otherwise, only GET would suffice.
Upvotes: 4