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.
135 136 137 138 |
# File 'lib/3scale/client/http_client.rb', line 135 def initialize(*) super @http.start end |
Class Method Details
.available? ⇒ Boolean
129 130 131 132 133 |
# File 'lib/3scale/client/http_client.rb', line 129 def self.available? Net::HTTP.instance_method(:keep_alive_timeout) rescue NameError false end |
Instance Method Details
#get_request ⇒ Object
145 146 147 |
# File 'lib/3scale/client/http_client.rb', line 145 def get_request(*) super.tap(&MARK_KEEPALIVE) end |
#post_request ⇒ Object
149 150 151 |
# File 'lib/3scale/client/http_client.rb', line 149 def post_request(*) super.tap(&MARK_KEEPALIVE) end |
#ssl! ⇒ Object
140 141 142 143 |
# File 'lib/3scale/client/http_client.rb', line 140 def ssl! super @http.start end |