Module: Jackal::Cfn::Utils::Http
Overview
Helper module for HTTP interactions
Instance Method Summary collapse
-
#response_endpoint(host, scheme) ⇒ Patron::Session
(also: #http_endpoint)
Provide remote endpoint session for sending response.
Instance Method Details
#response_endpoint(host, scheme) ⇒ Patron::Session Also known as: http_endpoint
Provide remote endpoint session for sending response
15 16 17 18 19 20 21 22 |
# File 'lib/jackal-cfn/utils/http.rb', line 15 def response_endpoint(host, scheme) session = Patron::Session.new session.timeout = config.fetch(:response_timeout, 20) session.connect_timeout = config.fetch(:connection_timeout, 10) session.base_url = "#{scheme}://#{host}" session.headers['User-Agent'] = "JackalCfn/#{Jackal::Cfn::VERSION.version}" session end |