ArkeologeN / node-linkedin

LinkedIn 2.0 wrapper in Node.js
MIT License
163 stars 78 forks source link

Feature request: timeout option #16

Closed bradvogel closed 10 years ago

bradvogel commented 10 years ago

It would be nice to specify a global timeout option that gets used in the request() call to LinkedIn. I find that the LinkedIn API has hiccups and won't respond sometimes. The library should at least use a sensible default of 60 seconds.

ArkeologeN commented 10 years ago

Sound's good! I'm going to integrate it today and release over npm or if in real quick, could you please submit the pull request?

bradvogel commented 10 years ago

Ok, I can do this now. Is it OK to just add at it to init()?

var linkedin = Linkedin.init('my_access_token', {timeout: 30000});
ArkeologeN commented 10 years ago

Accepting pull request! :) Didn't thoroughly took a look in good even!