Class: Attio::PooledHttpClient Private

Inherits:
Object
  • Object
show all
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

Since:

  • 1.0.0

Instance Method Summary collapse

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.

Since:

  • 1.0.0



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.

Since:

  • 1.0.0



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.

Since:

  • 1.0.0



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.

Since:

  • 1.0.0



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.

Since:

  • 1.0.0



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.

Since:

  • 1.0.0



228
229
230
# File 'lib/attio/connection_pool.rb', line 228

def put(path, body = {})
  @pool.with { |conn| conn.put(path, body) }
end