Class: YACCL::Services::Internal::BrowserBindingService::Basement

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/yaccl/services/internal/browser_binding_service.rb

Class Method Summary collapse

Class Method Details

.multipart_post(url, options) ⇒ Object



107
108
109
110
111
112
113
114
# File 'lib/yaccl/services/internal/browser_binding_service.rb', line 107

def self.multipart_post(url, options)
  url = URI.parse(url)
  req = Net::HTTP::Post::Multipart.new(url.path, options)
  req.basic_auth @basic_auth_username, @basic_auth_password unless @basic_auth_username.nil?
  Net::HTTP.start(url.host, url.port) do |http|
    http.request(req)
  end
end