setTimeout(function() { context.setVariable("response.content",backend.getResponse().status); }, 2000);But its throwing setTimeout undefined error.
Solved! Go to Solution.
var fs = require('fs'); var request = require('request'); var replay = require('request-replay'); // Note that the options argument is optional // Accepts the same options the retry module does and an additional // errorCodes array that default to ['EADDRINFO', 'ETIMEDOUT', 'ECONNRESET', 'ESOCKETTIMEDOUT'] replay(request('http://google.com/doodle.png', function (err, response, body) { // Do things }), { retries: 10, factor: 3 }) .on('replay', function (replay) { // "replay" is an object that contains some useful information console.log('request failed: ' + replay.error.code + ' ' + replay.error.message); console.log('replay nr: #' + replay.number); console.log('will retry in: ' + replay.delay + 'ms') })