I figured out why it wasn't working. There were two problems.
1) The file path I passed as the first parameter to the post method
didn't start with a /.
2) The HTML form I was posting to only supports GET requests, not POST.

On 1/23/06, Matthias Ludwig <matthias / kl-mailer.de> wrote:
> > It's 1.8.2 and I'm running under XP.
> >
> > I think my problem is that I need to pass a String as the second
> > parameter to HTTP.post. I don't know how to format it though. Should
> > it look like this?
> >
> > "name1=value1&name2=value2"
>
> I think, your code should work..
> This is working fine (for me):
>
> http = Net::HTTP.new 'www.xxx.de'
> res, data = http.post '/index/login/',
> 'email=matthias%40kl-mailer.de&password=xxx'
> if res.code == 200
>   puts data
>
> regards,
> Matthias
>
>


--
R. Mark Volkmann
Partner, Object Computing, Inc.