[HTTP] Understand 2xx HTTP Status Code Responses

Posted Answer1215

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了[HTTP] Understand 2xx HTTP Status Code Responses相关的知识,希望对你有一定的参考价值。

The 2xx family of status codes are used in HTTP responses to indicate success. Beyond the generic 200 OK status code, there are a set of more specific success status codes that provide additional context or details about the specific nature of the successful request/response. We will explore the available success status codes, and what additional information they convey.

 

Difference between 201 and 202:

Both for post request, difference is 201 means successfully create new data on the server, it will return \'Location\' prop in the header.

For 202, "Accepted", mean the request was accepted, but the data is not immedicatly available, there is no location prop:

 

206: Partial content, it is useful when we want to continue downloading the file , it tells how many bytes has been downloaded, and the total number of bytes:

以上是关于[HTTP] Understand 2xx HTTP Status Code Responses的主要内容,如果未能解决你的问题,请参考以下文章

LCA-tarjan understand 2

HTTP的response code 1xx,2xx,3xx,4xx,5xx分别代表什么

Http 状态码 1xx 2xx 3xx 4xx 5xx 还搞不懂?直接撸 HTTP Protocol 吧

Prometheus 黑盒探测有用的指标

Understand images & containers

将 fd2xx.lib 与 Visual Studio 集成