Skip to content

Commit

Permalink
replaced the deprecated method http.createClient for http.request
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarvgg committed Apr 27, 2013
1 parent 0c5d677 commit c9dfa24
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions itunes.js
Expand Up @@ -63,11 +63,15 @@ iTunes.prototype.request = function(dataType, target, params, callback) {
var self = this;
var results = new iResults();
var clock = new Timer(params.term);
var apple = http.createClient(80,self.server);
var query = self.getQuery(params);
var path = self.basePath + query;
var request = apple.request('GET',path,{host:self.server});
apple.request('GET',path);
var options = {
host: self.server,
port: 80,
path: path,
method: 'GET'
}
var request = http.request(options);
request.end();
clock.set();
request.on('response', function(response) {
Expand Down

0 comments on commit c9dfa24

Please sign in to comment.