Class: ThreeScale::Client::HTTPClient::NetHttpKeepAlive
- Inherits:
-
NetHttp
- Object
- BaseClient
- NetHttp
- ThreeScale::Client::HTTPClient::NetHttpKeepAlive
- Defined in:
- lib/3scale/client/http_client.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get_request ⇒ Object
-
#initialize ⇒ NetHttpKeepAlive
constructor
A new instance of NetHttpKeepAlive.
- #post_request ⇒ Object
- #ssl! ⇒ Object
Methods inherited from NetHttp
Methods inherited from BaseClient
Constructor Details
#initialize ⇒ NetHttpKeepAlive
Returns a new instance of NetHttpKeepAlive.
133 134 135 136 |
# File 'lib/3scale/client/http_client.rb', line 133 def initialize(*) super @http.start end |
Class Method Details
.available? ⇒ Boolean
127 128 129 130 131 |
# File 'lib/3scale/client/http_client.rb', line 127 def self.available? Net::HTTP.instance_method(:keep_alive_timeout) rescue NameError false end |
Instance Method Details
#get_request ⇒ Object
143 144 145 |
# File 'lib/3scale/client/http_client.rb', line 143 def get_request(*) super.tap(&MARK_KEEPALIVE) end |
#post_request ⇒ Object
147 148 149 |
# File 'lib/3scale/client/http_client.rb', line 147 def post_request(*) super.tap(&MARK_KEEPALIVE) end |
#ssl! ⇒ Object
138 139 140 141 |
# File 'lib/3scale/client/http_client.rb', line 138 def ssl! super @http.start end |