Class: HTTPkit::Client::MandatoryHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/httpkit/client/mandatory_handler.rb

Constant Summary collapse

USER_AGENT =
'User-Agent'.freeze
USER_AGENT_VALUE =
"httpkit/#{HTTPkit::VERSION}".freeze
HOST =
'Host'.freeze
HOST_VALUE =
'%s:%d'.freeze

Instance Method Summary collapse

Instance Method Details

#perform(request) {|request.with_headers(missing_headers(request))| ... } ⇒ Object

Yields:


14
15
16
# File 'lib/httpkit/client/mandatory_handler.rb', line 14

def perform(request)
  yield request.with_headers(missing_headers(request))
end

#setup(config, _, _) ⇒ Object


10
11
12
# File 'lib/httpkit/client/mandatory_handler.rb', line 10

def setup(config, _, _)
  @config = config
end