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

HTTP status codes

A huge list of well-defined HTTP status codes exists. This list of commonly used status codes is useful for designing RESTful APIs and leveraging the semantics that are defined for clear communication between producers and consumers.

It is highly recommended to not return a HTTP 200 status for all requests and encode the success or failure of the request in the response body. Keep in mind that there will be a specific HTTP status code for each scenario. Returning the proper status code will indicate the exact behavior that occurred on the server side, which allows the consumer to understand what happened there. There are five high-level HTTP status code classes, as described in the following table:

 

The following sections describe the most commonly used HTTP status codes in detail.

主站蜘蛛池模板: 襄樊市| 温泉县| 哈尔滨市| 浮梁县| 高平市| 德保县| 都江堰市| 浏阳市| 右玉县| 湘阴县| 霍城县| 永靖县| 高安市| 朝阳市| 石台县| 云南省| 图们市| 公主岭市| 南涧| 屏山县| 囊谦县| 津市市| 定州市| 崇信县| 兴国县| 阳朔县| 闽侯县| 济阳县| 靖边县| 南昌县| 遂平县| 高淳县| 桂东县| 曲麻莱县| 昂仁县| 香港| 白朗县| 铜山县| 启东市| 泗水县| 运城市|