{
  "name": "superagent",
  "version": "0.18.2",
  "description": "elegant & feature rich browser / node HTTP with a fluent API",
  "scripts": {
    "test": "make test"
  },
  "keywords": [
    "http",
    "ajax",
    "request",
    "agent"
  ],
  "author": {
    "name": "TJ Holowaychuk",
    "email": "tj@vision-media.ca"
  },
  "contributors": [
    {
      "name": "Hunter Loftis",
      "email": "hunter@hunterloftis.com"
    }
  ],
  "repository": {
    "type": "git",
    "url": "git://github.com/visionmedia/superagent.git"
  },
  "dependencies": {
    "qs": "0.6.6",
    "formidable": "1.0.14",
    "mime": "1.2.11",
    "component-emitter": "1.1.2",
    "methods": "1.0.1",
    "cookiejar": "2.0.1",
    "debug": "~1.0.1",
    "reduce-component": "1.0.1",
    "extend": "~1.2.1",
    "form-data": "0.1.3",
    "readable-stream": "1.0.27-1"
  },
  "devDependencies": {
    "zuul": "~1.6.0",
    "express": "3.5.0",
    "better-assert": "~0.1.0",
    "should": "3.1.3",
    "mocha": "*"
  },
  "browser": {
    "./lib/node/index.js": "./lib/client.js",
    "emitter": "component-emitter",
    "reduce": "reduce-component"
  },
  "component": {
    "scripts": {
      "superagent": "lib/client.js"
    }
  },
  "main": "./lib/node/index.js",
  "engines": {
    "node": "*"
  },
  "readme": "# SuperAgent\n\n  SuperAgent is a small progressive __client-side__ HTTP request library, and __Node.js__ module with the same API, sporting many high-level HTTP client features. View the [docs](http://visionmedia.github.com/superagent/).\n\n![super agent](http://f.cl.ly/items/3d282n3A0h0Z0K2w0q2a/Screenshot.png)\n\n## Installation\n\n  node:\n\n```\n$ npm install superagent\n```\n\n  component:\n\n```\n$ component install visionmedia/superagent\n```\n\n  with script tags use ./superagent.js\n\n## Motivation\n\n  This library spawned from my frustration with jQuery's weak & inconsistent Ajax support. jQuery's API, while having recently added some promise-like support, is largely static, forcing you to build up big objects containing all the header fields and options, not to mention most of the options are awkwardly named \"type\" instead of \"method\", etc. Onto examples!\n\n  The following is what you might typically do for a simple __GET__ with jQuery:\n\n```js\n$.get('/user/1', function(data, textStatus, xhr){\n\n});\n```\n\nGreat, it's ok, but it's kinda lame having 3 arguments just to access something on the `xhr`. Our equivalent would be:\n\n```js\nrequest.get('/user/1', function(res){\n\n});\n```\n\nThe response object is an instanceof `request.Response`, encapsulating all of this information instead of throwing a bunch of arguments at you. For example, we can check `res.status`, `res.header` for header fields, `res.text`, `res.body` etc.\n\nAn example of a JSON POST with jQuery typically might use `$.post()`, however once you need to start defining header fields you have to then re-write it using `$.ajax()`... so that might look like:\n\n```js\n$.ajax({\n  url: '/api/pet',\n  type: 'POST',\n  data: { name: 'Manny', species: 'cat' },\n  headers: { 'X-API-Key': 'foobar' }\n}).success(function(res){\n\n}).error(function(){\n\n});\n```\n\n Not only is it ugly, but it's pretty opinionated. jQuery likes to special-case {4,5}xx- for example, you cannot (easily at least) receive a parsed JSON response for say \"400 Bad Request\". This same request would look like this:\n\n```js\nrequest\n  .post('/api/pet')\n  .send({ name: 'Manny', species: 'cat' })\n  .set('X-API-Key', 'foobar')\n  .set('Accept', 'application/json')\n  .end(function(error, res){\n\n  });\n```\n\nBuilding on the existing API internally, we also provide something similar to `$.post()` for those times in life where your interactions are very basic:\n\n```js\nrequest.post('/api/pet', cat, function(error, res){\n\n});\n```\n\n# Plugins\n\nUsage:\n\n```js\nvar nocache = require('no-cache');\nvar request = require('superagent');\nvar prefix = require('superagent-prefix')('/static');\n\nprefix(request); // Prefixes *all* requests\n\nrequest\n.get('/some-url')\n.use(nocache) // Prevents caching of *only* this request\n.end(function(res){\n    // Do something\n});\n```\n\nExisting plugins:\n * [superagent-no-cache](https://github.com/johntron/superagent-no-cache) - prevents caching by including Cache-Control header\n * [superagent-prefix](https://github.com/johntron/superagent-prefix) - prefixes absolute URLs (useful in test environment)\n\nPlease prefix your plugin component with `superagent-*`\n\nFor superagent extensions such as couchdb and oauth visit the [wiki](https://github.com/visionmedia/superagent/wiki).\n\n## Running node tests\n\n  Install dependencies:\n\n     $ npm install\n\n  Run em!\n\n    $ make test\n\n## Running browser tests\n\n Install the test server deps (nodejs / express):\n\n    $ npm install\n\n Start the test server:\n\n    $ make test-server\n\n Visit `localhost:4000/` in the browser.\n\n## Browser build\n\n  The browser build of superagent is located in ./superagent.js\n\n## Examples:\n\n- [agency tests](https://github.com/visionmedia/superagent/blob/master/test/node/agency.js)\n- [express demo app](https://github.com/hunterloftis/component-test/blob/master/lib/users/test/controller.test.js)\n\n\n## License\n\n  MIT\n",
  "readmeFilename": "Readme.md",
  "bugs": {
    "url": "https://github.com/visionmedia/superagent/issues"
  },
  "_id": "superagent@0.18.2",
  "dist": {
    "shasum": "3a2533a2062ea4cbc4de05ee240aa5433d11ac13"
  },
  "_from": "superagent@~0.18",
  "_resolved": "https://registry.npmjs.org/superagent/-/superagent-0.18.2.tgz"
}
