您的位置:首页 > 理论基础 > 计算机网络

[HTTP] Understand 2xx HTTP Status Code Responses

2017-05-26 15:23 176 查看
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:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: