Class: HTTP::Retriable::Client

Inherits:
Client
  • Object
show all
Defined in:
lib/http/retriable/client.rb

Overview

Retriable version of HTTP::Client.

Constant Summary

Constants inherited from Client

Client::HTTP_OR_HTTPS_RE

Instance Method Summary collapse

Methods inherited from Client

#build_request, #close, #persistent?, #request

Methods included from Chainable

#accept, #auth, #basic_auth, #build_request, #connect, #cookies, #default_options, #default_options=, #delete, #encoding, #follow, #get, #head, #headers, #nodelay, #options, #patch, #persistent, #post, #put, #request, #retriable, #timeout, #trace, #use, #via

Methods included from Base64

encode64

Constructor Details

#initialize(performer, options) ⇒ Client

Returns a new instance of Client.

Parameters:



13
14
15
16
# File 'lib/http/retriable/client.rb', line 13

def initialize(performer, options)
  @performer = performer
  super(options)
end

Instance Method Details

#perform(req, options) ⇒ Object

Overriden version of HTTP::Client#make_request.

Monitors request/response phase with performer.



23
24
25
# File 'lib/http/retriable/client.rb', line 23

def perform(req, options)
  @performer.perform(self, req) { super(req, options) }
end