class ThreeScale::Client::HTTPClient::NetHttp
Public Class Methods
new(host, port)
click to toggle source
Calls superclass method
ThreeScale::Client::HTTPClient::BaseClient::new
# File lib/3scale/client/http_client.rb, line 112 def initialize(host, port) super @http = Net::HTTP.new(@host, port) end
Public Instance Methods
get(path, headers: nil)
click to toggle source
# File lib/3scale/client/http_client.rb, line 122 def get(path, headers: nil) @http.request get_request(path, headers: headers) end
post(path, payload, headers: nil)
click to toggle source
# File lib/3scale/client/http_client.rb, line 126 def post(path, payload, headers: nil) @http.request post_request(path, payload, headers: headers) end
ssl!()
click to toggle source
# File lib/3scale/client/http_client.rb, line 117 def ssl! @http = Net::HTTP.new(@host, @port) @http.use_ssl = true end