Method: Compliance::HTTP.get
- Defined in:
- lib/bundles/inspec-compliance/http.rb
.get(url, headers = nil, insecure) ⇒ Object
generic get requires
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/bundles/inspec-compliance/http.rb', line 12 def self.get(url, headers = nil, insecure) uri = _parse_url(url) req = Net::HTTP::Get.new(uri.path) if !headers.nil? headers.each do |key, value| req.add_field(key, value) end end send_request(uri, req, insecure) end |