class Amazon::Coral::HttpDestinationHandler

Attaches the specified endpoint URI to the outgoing request.

Public Class Methods

new(endpoint) click to toggle source

Initialize an HttpDestinationHandler with the specified endpoint URI.

# File lib/amazon/coral/httpdestinationhandler.rb, line 15
def initialize(endpoint)
  @log = LogFactory.getLog('Amazon::Coral::HttpDestinationHandler')

  @uri = case endpoint
         when URI then
             endpoint
         else
           URI.parse(endpoint)
         end
  @uri.path = '/' if @uri.path.nil? || @uri.path.empty?
end

Public Instance Methods

before(job) click to toggle source
# File lib/amazon/coral/httpdestinationhandler.rb, line 27
def before(job)
  job.request[:http_verb] = 'GET'
  job.request[:http_uri] = @uri.clone

  @log.debug "Initial request URI #{@uri}"
end