From 8c964d8fd6cc4a424968fde929d7bfd4c06c7cd6 Mon Sep 17 00:00:00 2001 From: Cian Woods Date: Wed, 15 Sep 2021 13:57:56 +0100 Subject: [PATCH] Add timeout --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index a5f82eb..1995a87 100644 --- a/index.js +++ b/index.js @@ -141,6 +141,7 @@ embedly.prototype.apiCall = function(endpoint, version, q, fn) { self.config.logger.debug('calling: ' + url + '?' + querystring.stringify(q)); var req = request .get(url) + .timeout(self.config.timeout) .set('User-Agent', self.config.userAgent) .set('Accept', 'application/json'); req.query(querystring.stringify(q));