Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Is there a option that i reset default timeout for request #13

cmingxu opened this Issue · 4 comments

4 participants


I want a place to set timeout for requests, node default timeout kind of too long for my scenario.


@cmingxu I was just looking for the same functionality. I'm playing around with how best to implement this. Can you take a look at my fork and see if you would do things differently?

My fork currently works this way:

  • You call the timeout method and pass the number of milliseconds you want to wait.
  • If the timeout is reach before the request is completed, req.abort() is called
  • The standard callback is triggered with err set to ECONNRESET and resp/body set to null.


client = ScopedClient.create('');


client.get()(function(err, resp, body) {
  if (err) {
    util.puts("ERROR: " + err);

@ejfinneran +1 for your solution's syntax, but your fork seems to be missing


@drdamour Whoops! I had done some repo house cleaning and forgot I had that branch but I just restored it.


Anyone still looking at this?

@technoweenie technoweenie closed this in #15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.