Permalink
Browse files

Don't use the depreacated createClient() API.

  • Loading branch information...
1 parent aa87a7a commit 5db4762d26205684cabb61fe852ce51dc4c1b75e @TooTallNate TooTallNate committed Jan 28, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/embedly.js
View
@@ -98,8 +98,12 @@ var parse_host = function(host) {
* }).start()
*/
var simple_request = function(host, method, path, headers, timeout) {
- var client = http.createClient(host.port, host.hostname, host.protocol == 'https')
- , request = client.request(method, path, headers)
+ host.method = method
+ host.path = path
+ host.headers = headers
+ host.protocol += ':'
+ var type = host.protocol == 'https:' ? https : http
+ , request = type.request(host)
, emitter = new EventEmitter()
, timeout = timeout || 200000

0 comments on commit 5db4762

Please sign in to comment.