Method: Net::HTTP::MultipartPost#post

Defined in:
lib/net/http_multipart_post.rb

#postObject



30
31
32
33
34
35
36
37
38
# File 'lib/net/http_multipart_post.rb', line 30

def post
  req = Post.new(url.path)
  req.body = body
  req.content_type = content_type
  req.basic_auth url.user, url.password if url.user
  Net::HTTP.new(url.host, url.port).start {|http|
    http.request(req)
  }    
end