_restartConnection(n: number) { this.emit( 'info', `Restarting Nylas DeltaStream connection (attempt ${n + 1}): ${ this.request != null ? this.request.href : undefined }` ); this.close(); return this.open(); }
request(options, function (err, response, body) { if (!err) console.log(response.request.href) callback(err, response, body); })
request(options, function (error, response, body) { if (!error && response.statusCode == 200) { article_object.url = response.request.href;