class AWS::SQS::Request

@private

Public Instance Methods

host() click to toggle source
# File lib/aws/sqs/request.rb, line 32
def host
  full_url.host
end
path() click to toggle source
# File lib/aws/sqs/request.rb, line 28
def path
  full_url.path
end
region() click to toggle source
Calls superclass method
# File lib/aws/sqs/request.rb, line 40
def region
  # sigv4 requires the region name when signing, this should come from
  # the QueueUrl param whenever present
  if
    param = params.find{|p| p.name == 'QueueUrl' } and
    host = URI.parse(param.value).host and
    matches = host.match(/^sqs\.(.+?)\./)
  then
    return matches[1]
  else
    super
  end
end
service() click to toggle source
# File lib/aws/sqs/request.rb, line 24
def service
  'sqs'
end
uri() click to toggle source
# File lib/aws/sqs/request.rb, line 36
def uri
  path
end

Private Instance Methods

full_url() click to toggle source
# File lib/aws/sqs/request.rb, line 56
def full_url
  if url_param = params.find { |p| p.name == "QueueUrl" }
    URI.parse(url_param.value)
  else
    URI::HTTP.build(:host => @host, :path => '/')
  end
end