Class: HttpsVmRepository
- Inherits:
-
HttpVmRepository
- Object
- VmRepository
- HttpVmRepository
- HttpsVmRepository
- Defined in:
- lib/ovfparse/https_vmrepository.rb
Constant Summary
Constants inherited from VmRepository
VmRepository::ALLOWABLE_PKG_TYPES, VmRepository::ALLOWABLE_PROTOCOLS, VmRepository::STRICT_CHECKING, VmRepository::USE_CACHE
Instance Attribute Summary
Attributes inherited from VmRepository
Instance Method Summary collapse
Methods inherited from HttpVmRepository
Methods inherited from VmRepository
ESXParse, FTParse, HTTParse, LSParse, create, #fetch, #initialize, #simplePackageConstruction, #uri
Constructor Details
This class inherits a constructor from VmRepository
Instance Method Details
#get ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/ovfparse/https_vmrepository.rb', line 3 def get #TODO slap a '/' char on the end of self.uri if it doesn't have one, otherwise many servers return 403 url = URI.parse(URI.escape(self.uri)) http = Net::HTTP.new(url.host, url.port) req = Net::HTTP::Get.new(url.path) http.use_ssl = true #req.basic_auth username, password response = http.request(req) return response.body end |