hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julius Davies <juliusdav...@cucbc.com>
Subject Re: Post parameter arrays !!
Date Wed, 19 Jan 2005 18:05:06 GMT
Whoops!  Meant to say:

method.setRequestHeader()

yours,

Julius

On Wed, 2005-19-01 at 14:35 +0800, Eric Chow wrote:
> Hi Julius,
> 
> I can't get any setHeader() method in PostMethod !
> How can I add the header ??
> 
> Eric
> 
> 
> 
> 
> 
> On Tue, 18 Jan 2005 18:15:22 -0800, Julius Davies
> <juliusdavies@cucbc.com> wrote:
> > Hi, Eric,
> > 
> > In an earlier post I recommend using Mozilla + LiveHttpHeaders plugin to watch exactly
what the browser does.  In this example, the browser's request looks like:
> > 
> > =====================================
> > POST /servlet/mypost HTTP/1.1
> > Content-Type: application/x-www-form-urlencoded
> > Content-Length: 17
> > key=a&key=b&key=c
> > 
> > =====================================
> > 
> > Does that give you an idea?  Don't forget to add this to your code!
> > 
> > method.setHeader( "content-type", "application/x-www-form-urlencoded" );
> > 
> > yours,
> > 
> > Julius
> > 
> > 
> > -----Original Message-----
> > From:   Eric Chow [mailto:eric138@gmail.com]
> > Sent:   Mon 1/17/2005 8:15 PM
> > To:     httpclient-user@jakarta.apache.org
> > Cc:
> > Subject:        Post parameter arrays !!
> > Hello,
> > 
> > How can I post an array of parameters ?
> > 
> > For example,
> > 
> > <form action="/servlet/mypost" method="post">
> >   <input type=text name="key">
> >   <input type=text name="key">
> >  <input type=text name="key">
> > </form>
> > 
> > As in the above HTML form, there are three text field with the same name "key",
> > how can I post this kind of form with HttpClient ??
> > 
> > Eric
> > 
> > ---------------------------------------------------------------------
> > 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