Permalink
Browse files

Modified calls to http.ClientResponse to updated API for node v0.3.8

  • Loading branch information...
1 parent 5a03476 commit 8cc3a194955092e5b0f8a9f138e656cbff087b34 @Tidwell committed Feb 7, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/request.js
View
@@ -77,14 +77,14 @@ Request.prototype.executeRequest= function(method, arguments, sign_it, result_ma
argumentString+= (operator + key + "=" + arguments[key]);
if( operator == "?" ) operator= "&";
}
-
+
var request= this.getHttpClient().request("GET",
this.baseUrl+ argumentString,
{"host": "api.flickr.com"});
var isFeedRequest= this.isFeedRequest;
request.addListener('response', function (response) {
var result= "";
- response.setBodyEncoding("utf8");
+ response.setEncoding("utf8");
response.addListener("data", function (chunk) {
result+= chunk;
});
@@ -129,7 +129,7 @@ Request.prototype.executeRequest= function(method, arguments, sign_it, result_ma
}
});
});
- request.close();
+ request.end();
};
exports.Request = Request;

0 comments on commit 8cc3a19

Please sign in to comment.