How to design a RESTful API that queries info about a verb (e.g. a potential POST request)?
问题 I'm learning how to design a RESTful API and I've come across a quandary. Say I have a POST endpoint to perform an action. The action has a certain cost associated with it. The cost depends on what the action is, particularly, on the body of the POST. For example, given these two requests: POST /flooblinate {"intensity": 50, "colorful": true, "blargs": [{"norg": 43}]} POST /flooblinate {"intensity": 100, "colorful": false, "blargs": []} Say the first one costs 500 and the second one costs 740