Posted By

lmcdougall on 09/13/07


Tagged

textmate post ruby


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

webstic
4rp70x1n


Post Data From Ruby


 / Published in: Ruby
 

  1. uri = URI.parse(url)
  2. req = Net::HTTP::Post.new(url)
  3. req.set_form_data({
  4. \'field\' => \'value\'
  5. })
  6. res = Net::HTTP.new(uri.host, uri.port).start { |http| http.request(req) }

Report this snippet  

You need to login to post a comment.