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 > <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] > > Sent: Mon 1/17/2005 8:15 PM > > To: [email protected] > > 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: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
