Mihai Petcu
Mihai Petcu

Reputation: 368

What is the purpose of the HTTP response status code 226?

Does someone ever use HttpStatus.IM_USED (226 - IM Used), and in which case or situation?

Upvotes: 6

Views: 4813

Answers (1)

Spencer Williams
Spencer Williams

Reputation: 851

This site does a much better job of explaining the purpose of this response status code. Basically, there is a feature called Delta encoding in HTTP that an HTTP server might support. If so, then it will be possible for the client to request changes to a resource that it has already cached instead of requesting the whole resource again.

To request the feature, the client request must have an A-IM header specifying what Instance Manipulation types it supports, the values of which are listed. If the server supports this feature, it will respond with the 226 status code and the body of the diff. Otherwise, it will respond with status 200 and the whole resource.

Upvotes: 5

Related Questions