# Net:HTTP post (to rails) example?

**URL:** <https://www.ruby-forum.com/t/net-http-post-to-rails-example/164896>\
**Category:** Rails\
**Created:** [April 7, 2009, 5:12am UTC](https://www.ruby-forum.com/t/net-http-post-to-rails-example/164896 "2009-04-07T05:12:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![e\_deleflie](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/858c86/32.png) [@e\_deleflie](https://www.ruby-forum.com/u/e_deleflie)\
**Post date:** [April 7, 2009, 5:12am UTC](https://www.ruby-forum.com/t/net-http-post-to-rails-example/164896/1 "2009-04-07T05:12:08Z")

</div>

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
