官术网_书友最值得收藏!

DELETE and OPTIONS

The DELETE API method is used to delete a resource from the database. It is similar to PUT but without a body. It just needs an ID of the resource to be deleted. Once a resource gets deleted, subsequent GET requests return a 404 not found status. 

Responses to this method are not cacheable (should caching be implemented) because the  DELETE method is idempotent.

The OPTIONS API method is the most underrated in API development. Given the resource, this method tries to find all possible methods (GET, POST, and so on) defined on the server. It is like looking at the menu card at a restaurant and then ordering an item that is available (whereas if you randomly order a dish, the waiter will tell you it is not available). It is best practice to implement the OPTIONS method on the server. From the client, make sure OPTIONS is called first, and if the method is available, then proceed with it. 

主站蜘蛛池模板: 泉州市| 农安县| 梓潼县| 汤阴县| 塔城市| 海盐县| 凤凰县| 驻马店市| 旬阳县| 潼南县| 六盘水市| 华坪县| 改则县| 弥勒县| 兰考县| 古田县| 五常市| 科技| 右玉县| 通渭县| 越西县| 梁山县| 类乌齐县| 武城县| 海淀区| 醴陵市| 南安市| 镇远县| 崇仁县| 广河县| 如东县| 洱源县| 和林格尔县| 广平县| 邓州市| 师宗县| 金山区| 红桥区| 宁晋县| 通州市| 普宁市|