class ThreeScale::Client::HTTPClient::NetHttpKeepAlive

Constants

HTTP_CONNECTION
HTTP_KEEPALIVE
MARK_KEEPALIVE

Public Class Methods

available?() click to toggle source
# File lib/3scale/client/http_client.rb, line 141
def self.available?
  Net::HTTP.instance_method(:keep_alive_timeout)
rescue NameError
  false
end
new(*) click to toggle source
# File lib/3scale/client/http_client.rb, line 147
def initialize(*)
  super
  @http.start
end

Public Instance Methods

get_request(*) click to toggle source
# File lib/3scale/client/http_client.rb, line 157
def get_request(*)
  super.tap(&MARK_KEEPALIVE)
end
post_request(*) click to toggle source
# File lib/3scale/client/http_client.rb, line 161
def post_request(*)
  super.tap(&MARK_KEEPALIVE)
end
ssl!() click to toggle source
# File lib/3scale/client/http_client.rb, line 152
def ssl!
  super
  @http.start
end