Permalink
Browse files

add agent support

  • Loading branch information...
1 parent f281f12 commit 64fe9a7723d205bfd2cfd287f04c26b6c2454067 @xetorthio xetorthio committed Sep 15, 2011
Showing with 4 additions and 3 deletions.
  1. +1 −0 lib/aws.js
  2. +3 −3 lib/sqs.js
View
@@ -59,6 +59,7 @@ var genericAWSClient = function(obj) {
var options = {
host: obj.host,
path: obj.path,
+ agent: obj.agent,
method: 'POST',
headers: headers
};
View
@@ -2,10 +2,10 @@ exports.init = function(genericAWSClient) {
// Creates a Simple Queue Service API client
var createSQSClient = function (accessKeyId, secretAccessKey, options) {
options = options || {};
-
var client = SQSClient({
host: options.host || "sqs.us-east-1.amazonaws.com",
path: options.path || "/",
+ agent: options.agent,
accessKeyId: accessKeyId,
secretAccessKey: secretAccessKey,
secure: options.secure,
@@ -17,7 +17,7 @@ exports.init = function(genericAWSClient) {
var SQSClient = function(obj) {
var aws = genericAWSClient({
host: obj.host, path: obj.path, accessKeyId: obj.accessKeyId,
- secretAccessKey: obj.secretAccessKey, secure: obj.secure
+ secretAccessKey: obj.secretAccessKey, secure: obj.secure, agent:obj.agent
})
obj.call = function(action, query, callback) {
query["Action"] = action
@@ -29,4 +29,4 @@ exports.init = function(genericAWSClient) {
return obj;
}
return createSQSClient;
-}
+}

0 comments on commit 64fe9a7

Please sign in to comment.