Class: Attio::PooledHttpClient Private
- Inherits:
-
Object
- Object
- Attio::PooledHttpClient
- Defined in:
- lib/attio/connection_pool.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Wrapper for pooled HTTP connections
Instance Method Summary collapse
- #delete(path, body = nil) ⇒ Object private
- #get(path, params = nil) ⇒ Object private
-
#initialize(pool) ⇒ PooledHttpClient
constructor
private
A new instance of PooledHttpClient.
- #patch(path, body = {}) ⇒ Object private
- #post(path, body = {}) ⇒ Object private
- #put(path, body = {}) ⇒ Object private
Constructor Details
#initialize(pool) ⇒ PooledHttpClient
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of PooledHttpClient.
212 213 214 |
# File 'lib/attio/connection_pool.rb', line 212 def initialize(pool) @pool = pool end |
Instance Method Details
#delete(path, body = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
232 233 234 |
# File 'lib/attio/connection_pool.rb', line 232 def delete(path, body = nil) @pool.with { |conn| conn.delete(path, body) } end |
#get(path, params = nil) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
216 217 218 |
# File 'lib/attio/connection_pool.rb', line 216 def get(path, params = nil) @pool.with { |conn| conn.get(path, params) } end |
#patch(path, body = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
224 225 226 |
# File 'lib/attio/connection_pool.rb', line 224 def patch(path, body = {}) @pool.with { |conn| conn.patch(path, body) } end |
#post(path, body = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
220 221 222 |
# File 'lib/attio/connection_pool.rb', line 220 def post(path, body = {}) @pool.with { |conn| conn.post(path, body) } end |
#put(path, body = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
228 229 230 |
# File 'lib/attio/connection_pool.rb', line 228 def put(path, body = {}) @pool.with { |conn| conn.put(path, body) } end |