[Home] [By Thread] [By Date] [Recent Entries]


On Mon, Apr 22, 2002 at 02:29:46PM +0100, Francis Norton wrote:
> But secondly, the the 
> parameters for my transaction are in fact for a database query, which  
> HTTP 1.1 appears to say [1] is an incorrect use of POST.

Yes, but as long as the result of the query isn't in the response to
that POST, then POST is fine.

e.g.

POST http://www.example.org/query
Content-Type: application/xml
<some-query-in-XML>

response;

HTTP 201 Created
Location: http://www.example.org/query-results/3428934384

(which tells the client that a new resource was created as a result of
the POST, and the Location header identifies that new resource)

next;

GET http://www.example.org/query-results/3428934384

and the response to that GET includes the query results.

In other words, this is a deferred response, where the use of POST is
appropriate because a resource is created that identifies the query
results, and that is a side effect.  The response to the query is
still returned over GET.

MB
-- 
Mark Baker, Chief Science Officer, Planetfred, Inc.
Ottawa, Ontario, CANADA.      mbaker@p...
http://www.markbaker.ca   http://www.planetfred.com

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member