Class: Holoserve::Connector::Tool::Uploader

Inherits:
Object
  • Object
show all
Defined in:
lib/holoserve/connector/tool/uploader.rb

Instance Method Summary collapse

Constructor Details

#initialize(filename, http_method, url, options = { }) ⇒ Uploader

Returns a new instance of Uploader.



5
6
7
# File 'lib/holoserve/connector/tool/uploader.rb', line 5

def initialize(filename, http_method, url, options = { })
  @filename, @http_method, @url, @options = filename, http_method, url, options
end

Instance Method Details

#uploadObject



9
10
11
# File 'lib/holoserve/connector/tool/uploader.rb', line 9

def upload
  Transport::HTTP.request @http_method, @url, @options.merge(:headers => headers, :body => body)
end