lib/ddbcli/ddb-client.rb in ddbcli-0.3.6 vs lib/ddbcli/ddb-client.rb in ddbcli-0.3.7

- old
+ new

@@ -67,16 +67,16 @@ headers = { 'Content-Type' => 'application/x-amz-json-1.0', 'X-Amz-Target' => "DynamoDB_#{API_VERSION.gsub('-', '')}.#{action}", 'Content-Length' => req_body.length.to_s, 'User-Agent' => USER_AGENT, - 'Host' => 'dynamodb.us-east-1.amazonaws.com', + 'Host' => @endpoint.host, 'X-Amz-Date' => iso8601(date), 'X-Amz-Content-Sha256' => hexhash(req_body), 'Accept' => '*/*', 'Accept-Encoding' => 'gzip', - } + } headers['Authorization'] = authorization(date, headers, req_body) Net::HTTP.version_1_2 http = Net::HTTP.new(@endpoint.host, @endpoint.port) @@ -244,6 +244,6 @@ end return retval end end # Client -end # SimpleDB +end # DynamoDB