Jump to content

HTTP 303: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Line 8: Line 8:
'''303 See Other''' has been proposed as one way of responding to a request for a [[Universal_Resource_Identifier|URI]] that identifies a ''real-world object'' according to [[Semantic Web]] theory (the other being the use of ''hash URIs'').<ref>[http://www.w3.org/TR/cooluris/ Cool URIs for the Semantic Web], see section 4</ref> For example, when building a [[Restful web service]] that needs to return to the caller immediately but continue executing asynchronously (such as a long-lived image conversion), the web service can provide a status check URI that allows the original client who requested the conversion to check on the conversion's status. This status check web service should return '''303 See Other''' to the caller when the task is complete, along with a URI from which to retrieve the result in the ''Location'' [[HTTP header]] field.<ref>Subbu Allamaraju. ''RESTful Web Services Cookbook: Solutions for Improving Scalability and Simplicity''. O'Reilly Media, 2010, p. 20.</ref>
'''303 See Other''' has been proposed as one way of responding to a request for a [[Universal_Resource_Identifier|URI]] that identifies a ''real-world object'' according to [[Semantic Web]] theory (the other being the use of ''hash URIs'').<ref>[http://www.w3.org/TR/cooluris/ Cool URIs for the Semantic Web], see section 4</ref> For example, when building a [[Restful web service]] that needs to return to the caller immediately but continue executing asynchronously (such as a long-lived image conversion), the web service can provide a status check URI that allows the original client who requested the conversion to check on the conversion's status. This status check web service should return '''303 See Other''' to the caller when the task is complete, along with a URI from which to retrieve the result in the ''Location'' [[HTTP header]] field.<ref>Subbu Allamaraju. ''RESTful Web Services Cookbook: Solutions for Improving Scalability and Simplicity''. O'Reilly Media, 2010, p. 20.</ref>


=='''Example'''==
==Example==
Client request:
Client request:
<pre>
<pre>

Revision as of 11:28, 28 April 2012

The HTTP response status code 303 See Other is the correct manner in which to redirect web applications to a new URI, particularly after an HTTP POST has been performed.

This response indicates that the correct response can be found under a different URI and should be retrieved using a GET method. The specified URI is not a substitute reference for the original resource.

This status code should be used with the location header, as described below.

303 See Other has been proposed as one way of responding to a request for a URI that identifies a real-world object according to Semantic Web theory (the other being the use of hash URIs).[1] For example, when building a Restful web service that needs to return to the caller immediately but continue executing asynchronously (such as a long-lived image conversion), the web service can provide a status check URI that allows the original client who requested the conversion to check on the conversion's status. This status check web service should return 303 See Other to the caller when the task is complete, along with a URI from which to retrieve the result in the Location HTTP header field.[2]

Example

Client request:

GET / HTTP/1.1
Host: www.example.com

Server response:

HTTP/1.1 303 See Other
Location: http://example.org/other

See also

References

  1. ^ Cool URIs for the Semantic Web, see section 4
  2. ^ Subbu Allamaraju. RESTful Web Services Cookbook: Solutions for Improving Scalability and Simplicity. O'Reilly Media, 2010, p. 20.