Class: Net::HTTP

Inherits:
Object show all
Defined in:
lib/wdd-ruby-ext/http.rb

Class Method Summary collapse

Class Method Details

.get_with_headers(host, port, path, headers) ⇒ Object

Convenience method to do HTTP GET with custom headers



19
20
21
22
23
# File 'lib/wdd-ruby-ext/http.rb', line 19

def HTTP.get_with_headers(host, port, path, headers)
  start(host, port) do |http|
    return http.get(path, headers)
  end
end