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: Create parameters into GetMethod body
Date Mon, 23 Apr 2007 09:25:01 GMT
On Mon, 2007-04-23 at 14:34 +0800, wolverine my wrote:
> OK, I think the 3rd-party application is sending a non-standard HTTP
> GET method (which has a body) to me. They are making their own
> application specific request...
> 
> In this case, do you think I can still make use of HttpClient? How can
> I extend the HttpClient classes to generate this special kind of
> request?
> 

Yes, you can. Just create a custom class extending the
EntityEnclosingMethod class and make it return GET as its method name

Hope this helps,

Oleg


> 
> On 4/20/07, Oleg Kalnichevski <olegk@apache.org> wrote:
> > On Fri, 2007-04-20 at 10:19 +0800, wolverine my wrote:
> > > Can you enlighten me where is this specified by the RFC?
> > >
> >
> > See section 9 (Method Definitions). Only POST and PUT methods are
> > expected to enclose a request entity.
> >
> > Hope this helps
> >
> > Oleg
> >
> >
> > > I'm trying to search from the RFC2616
> > > (http://tools.ietf.org/html/rfc2616)  but I haven't find anything
> > > yet...
> > >
> > > Appreciate your advise, thank you!
> > >
> > >
> > > On 4/17/07, Oleg Kalnichevski <olegk@apache.org> wrote:
> > > > On Tue, 2007-04-17 at 20:59 +0800, wolverine my wrote:
> > > > > Hi!
> > > > >
> > > > > Sorry, this email was wrongly sent commons-user mailing list!
> > > > >
> > > > > I would like to generate a Get method looks like the following:
> > > > >
> > > > > GETT http://myserver:8890/dummy HTTP/1.1
> > > > > ...
> > > > > Connection: keep-alive
> > > > > NAME=AnyName
> > > > > AGE=56
> > > > >
> > > > > The request body has the proprietary parameter pairs (e.g. NAME and
> > > > > AGE) that are required by the server.
> > > > >
> > > > > How can I generate these parameters into the request body?
> > > > > Whata about setParams(HttpMethodParams)?
> > > > >
> > > >
> > > > Wolverine,
> > > >
> > > > HTTP GET requests are not supposed to have a request body. You probably
> > > > want to be using HTTP POST instead
> > > >
> > > > Hope this helps
> > > >
> > > > Oleg
> > > >
> > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


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


Mime
View raw message