Net:HTTP post (to rails) example?

Hi all,

I've got a little remote uploader app (written in Ruby Shoes) that uses Mechanize to create a new object (I think mechanize works by submitting an http form).

I'd like to take Mechanize out of the equation and do a straight HTTP POST (authenticated).. but I'm having problems with how to manage the fact that my object has 2 files in it ... what is the syntax for a POST that includes a bunch of fields and a couple of files to be posted?

Can anyone help with an example?

Etienne