September 10, 2007

Okay… at least the ‘curb’ gem is better.

Curl::Easy.perform(url) do |curl|
      curl.multipart_form_post = true
      file_field = Curl::PostField.file('File', file)
      file_field.content_type = 'application/xml'
      curl.http_post(file_field)
    end