hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Message body in GET method?
Date Thu, 19 Jun 2008 18:44:03 GMT
On Wed, 2008-06-18 at 17:19 -0700, David Gallardo wrote:
> I'm doing some REST-style stuff, where I own both ends of the conversation,
> and like to do all my queries via GETs. However, I'd like to do long ones
> with an XML query language, and send the XML doc as the message body. It
> seems to me that as long as both sides agree, and are capable of this, this
> has the clearest semantics.
> 
> I find that HttpClient doesn't allow this, because HttpGet subclasses
> HttpRequestBase rather than HttpEntityEnclosingRequestBase.
> 
> By my reading, RFC 2616 ("Hypertext Transfer Protocol -- HTTP/1.1") seems to
> say that GETs are allowed to have bodies: Section 7 says bodies are allowed
> unless they are specifically disallowed by a request method, and section
> 9.2, where it discusses the GET method, doesn't say anything about
> disallowing message bodies or entities.
> 
> I suggest that HttpGet should be changed to subclass
> HttpEntityEnclosingRequestBase rather than just HttpRequestBase. I believe
> it should be in keeping with the rfc rather than convention, but would
> welcome further discussion.
> 

David,

What you are trying to do / propose is a severe violation of the HTTP
spec. See section 9.1

Oleg


> @D
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message