MCPcopy Index your code
hub / github.com/danwrong/restler / command

Function command

test/restler.js:249–258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

247 'Should correctly retry while pending': function(test) {
248 var counter = 0, request;
249 function command() {
250 var args = [].slice.call(arguments);
251 var method = args.shift();
252 if (method) {
253 setTimeout(function() {
254 request[method]();
255 command.apply(null, args);
256 }, 50);
257 }
258 }
259
260 request = rest.get(host, { headers: { 'x-delay': '1000' } }).on('complete', function() {
261 if (++counter < 3) {

Callers 1

restler.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected