HTTP

HTTP 200 OK vs 207 Multi-Status

Both HTTP 200 (OK) and 207 (Multi-Status) belong to the 2xx Success category. 200 indicates that the request succeeded. The meaning depends on the HTTP method: GET returns the resource, POST reports the action result, HEAD returns headers only. Meanwhile, 207 means that the response body contains status information for multiple resources, in situations where multiple status codes might be appropriate (WebDAV).

Mô tả

The request succeeded. The meaning depends on the HTTP method: GET returns the resource, POST reports the action result, HEAD returns headers only.

Khi bạn thấy mã này

The most common HTTP response — indicates the request was processed successfully.

Cách khắc phục

No fix needed. The request succeeded as expected.

Mô tả

The response body contains status information for multiple resources, in situations where multiple status codes might be appropriate (WebDAV).

Khi bạn thấy mã này

In WebDAV operations that affect multiple resources simultaneously.

Cách khắc phục

Parse the XML body to check the status of each individual resource.

Sự khác biệt chính

1.

HTTP 200: The request succeeded. The meaning depends on the HTTP method: GET returns the resource, POST reports the action result, HEAD returns headers only.

2.

HTTP 207: The response body contains status information for multiple resources, in situations where multiple status codes might be appropriate (WebDAV).

3.

You encounter 200 when the most common HTTP response — indicates the request was processed successfully.

4.

You encounter 207 when in WebDAV operations that affect multiple resources simultaneously.

Khi nào dùng cái nào

For 200 (OK): No fix needed. The request succeeded as expected. For 207 (Multi-Status): Parse the XML body to check the status of each individual resource.

Tìm hiểu thêm