- Hands-On RESTful Web Services with TypeScript 3
- Biharck Muniz Araújo
- 165字
- 2021-07-02 12:19:23
2xx – success
The variations of 2xx status codes, which represent success scenarios, can be compressed into four main 2xx status codes:
- 200 OK: This is the most common happy path response, indicating that the request succeeded.
- 201 Created: This indicates that a new resource has been successfully created. It is most commonly used as a response to POST request methods. This response should contain a location header, which provides the URL for the new resource that has been created. There is a recommendation to send the response body back with the newly created resource. Essentially, the response body is the same if the consumer hits the GET endpoint to retrieve the resource.
- 202 Accepted: This is kind of equivalent to 201. The only difference is that 202 is used for asynchronous operations, as it clearly indicates eventual consistency.
- 204 No Content: This is also similar to 200, but only when there is no response body. This is mostly used for DELETE requests.
推薦閱讀
- 同仁眼超聲診斷手冊(cè)
- 新編男性不育與不孕
- 胃腸間質(zhì)瘤科普教育手冊(cè)
- 癌癥療愈錄:腫瘤門(mén)診敘事紀(jì)實(shí)
- 運(yùn)動(dòng)學(xué)(第二版)
- 眼科手術(shù)操作與技巧(第2版)
- 眼科標(biāo)準(zhǔn)數(shù)據(jù)集(2019版)
- 皮膚美容激光治療原理與技術(shù)
- 分?jǐn)?shù)階微積分圖像修復(fù)模型在醫(yī)學(xué)CT圖像金屬偽影去除中的應(yīng)用
- 意識(shí)障礙康復(fù)評(píng)定與治療學(xué)
- 腦癱兒童的音樂(lè)治療
- 臍帶間充質(zhì)干細(xì)胞轉(zhuǎn)化醫(yī)學(xué)
- 呼吸與危重癥醫(yī)學(xué)2014-2015
- 神經(jīng)系統(tǒng)疾病與精神障礙
- 肺癌防治一本通