Class: Envkeeper::HTTP
- Inherits:
-
Object
- Object
- Envkeeper::HTTP
- Defined in:
- lib/envkeeper/http.rb
Class Method Summary collapse
Class Method Details
.get(path:, body: nil, headers: {}) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/envkeeper/http.rb', line 6 def get(path:, body: nil, headers: {}) request = Net::HTTP::Get.new(path) headers.each { |header| request[header] = headers[header] } request.set_form_data(body) if body http_request.start { |http| http.request(request) } end |