The post discusses the problem of mapping business operations to predefined HTTP methods and provides ways to implement custom methods in REST API endpoints. It explores the pros and cons of different solutions, including sub-resources, special 'actions' endpoints, query parameters, and the use of a colon punctuation mark. The post concludes with a reminder to use custom methods with caution to avoid turning the RESTful API into an RPC.

5m read timeFrom dev.to
Post cover image
Table of contents
The problem with mapping business operation to a set of predefined HTTP methodsSub-resourceA special actions endpointsCustom method with a query parameterCustom method with a colon punctuation markConclusionResources

Sort: