W3C home > Mailing lists > Public > ietf-http-wg@w3.org > July to September 2010

POST with empty body

From: Darrel Miller <darrel@tavis.ca>
Date: Thu, 02 Sep 2010 00:31:15 +0000
To: <ietf-http-wg@w3.org>
Message-ID: <016c01cb4a36$0ce429c0$26ac7d40$@tavis.ca>
In the description of POST here [1], it starts with:

"The POST method is used to request that the origin server accept the
representation enclosed in the request as data to be processed by the
target resource."

This seems to infer that it is expected that a POST include a body.  Is it
required to have a body?  Is it unreasonable to expect a client to issue 

POST http://example.org/tokens

...and expect a token to be created, despite the fact that no representation
is passed to the origin server?

Taking this a step further, is the use of query string parameters instead of
a post body considered a valid request.  Could a client make the following

POST http://mapservice.org/Waypoints?latitude=51&longiitude=114

I realize this is not a common usage, but my question is whether this is
prohibited by the HTTP specification, whether it is discouraged due to
negative impacts, or whether it a reasonable usage that is just not clear
from the description of POST.

Thanks for your time,

Darrel Miller

[1] http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-11#page-17
Received on Thursday, 2 September 2010 12:24:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:13:48 UTC