aheckmann / node-ses

An Amazon SES api for nodejs with proper error handling.
http://aheckmann.github.com/node-ses
MIT License
201 stars 37 forks source link

Add request timeout option #76

Open shaynem opened 2 years ago

shaynem commented 2 years ago

The default nodejs request timeout is quite large (120000ms), adding option to specify your own timeout, alleviates waiting, when doing tests when simulating spotty network environments.

Feel free to adjust the default 300ms timeout.

Added functionality + adjusted README.md to include new timeout option.

markstos commented 2 years ago

Adding the timeout option is OK, but please rebase to clean up the commits. There's no need to have commit to add a hardcoded option, only to follow-up and make it dynamic. The first three commits can be squashed into one. See my comment about the fourth commit.