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.
@D
--
View this message in context:
http://www.nabble.com/Message-body-in-GET-method--tp17994858p17994858.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]