{
  "_from": "request-replay@>=0.2.0 <0.3.0",
  "_id": "request-replay@0.2.0",
  "_location": "/bower/bower-registry-client/request-replay",
  "_npmUser": {
    "email": "andremiguelcruz@msn.com",
    "name": "satazor"
  },
  "_npmVersion": "1.3.2",
  "_phantomChildren": {},
  "_requiredBy": [
    "/bower/bower-registry-client"
  ],
  "_resolved": "https://registry.npmjs.org/request-replay/-/request-replay-0.2.0.tgz",
  "_shasum": "9b693a5d118b39f5c596ead5ed91a26444057f60",
  "_shrinkwrap": null,
  "author": {
    "email": "hello@indigounited.com",
    "name": "IndigoUnited",
    "url": "http://indigounited.com"
  },
  "bugs": {
    "url": "http://github.com/IndigoUnited/node-request-replay/issues"
  },
  "dependencies": {
    "retry": "~0.6.0"
  },
  "description": "Replays a request when a network error occurs",
  "devDependencies": {
    "expect.js": "~0.2.0",
    "mocha": "~1.12.0",
    "request": "~2"
  },
  "directories": {},
  "dist": {
    "shasum": "9b693a5d118b39f5c596ead5ed91a26444057f60",
    "tarball": "http://registry.npmjs.org/request-replay/-/request-replay-0.2.0.tgz"
  },
  "homepage": "https://github.com/IndigoUnited/node-request-replay#readme",
  "keywords": [
    "mikeal",
    "network",
    "replay",
    "request",
    "retry"
  ],
  "license": "MIT",
  "main": "index.js",
  "maintainers": [
    {
      "name": "satazor",
      "email": "andremiguelcruz@msn.com"
    }
  ],
  "name": "request-replay",
  "optionalDependencies": {},
  "readme": "# request-replay [![Build Status](https://secure.travis-ci.org/IndigoUnited/node-request-replay.png)](http://travis-ci.org/IndigoUnited/node-request-replay.png)\n\nReplays a [request](https://github.com/mikeal/request) when a network error occurs using the [retry](https://github.com/felixge/node-retry) module.\n\n**DO NOT** use this module if you are piping `request` instances.\nIf you are listening to `data` events to buffer, beware that you must reset everything when a `replay` occurs.\nThis is why `pipping` is not supported.\n\n\n## Installation\n\n`$ npm install request-replay`\n\n\n## Usage\n\n```js\nvar fs = require('fs');\nvar request = require('request');\nvar replay = require('request-replay');\n\n// Note that the options argument is optional\n// Accepts the same options the retry module does and an additional\n// errorCodes array that default to ['EADDRINFO', 'ETIMEDOUT', 'ECONNRESET', 'ESOCKETTIMEDOUT']\nreplay(request('http://google.com/doodle.png', function (err, response, body) {\n    // Do things\n}), {\n    retries: 10,\n    factor: 3\n})\n.on('replay', function (replay) {\n    // \"replay\" is an object that contains some useful information\n    console.log('request failed: ' + replay.error.code + ' ' + replay.error.message);\n    console.log('replay nr: #' + replay.number);\n    console.log('will retry in: ' + replay.delay + 'ms')\n})\n```\n\nNote that the default retry options are modified to be more appropriate for requests:\n\n* `retries`: The maximum amount of times to retry the operation. Default is `5`.\n* `factor`: The exponential factor to use. Default is `2`.\n* `minTimeout`: The amount of time before starting the first retry. Default is `2000`.\n* `maxTimeout`: The maximum amount of time between two retries. Default is `35000`.\n* `randomize`: Randomizes the timeouts by multiplying with a factor between `1` to `2`. Default is `true`.\n\n\n## License\n\nReleased under the [MIT License](http://www.opensource.org/licenses/mit-license.php).\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git://github.com/IndigoUnited/node-request-replay.git"
  },
  "scripts": {
    "test": "mocha -R spec"
  },
  "version": "0.2.0"
}
