{
  "name": "superagent",
  "version": "0.15.4",
  "description": "elegant & feature rich browser / node HTTP with a fluent API",
  "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.5",
    "formidable": "1.0.14",
    "mime": "1.2.5",
    "emitter-component": "1.0.0",
    "methods": "0.0.1",
    "cookiejar": "1.3.0",
    "debug": "~0.7.2"
  },
  "devDependencies": {
    "express": "3.3.1",
    "better-assert": "~0.1.0",
    "should": "*",
    "mocha": "*"
  },
  "component": {
    "scripts": {
      "superagent": "lib/client.js"
    }
  },
  "main": "lib/node",
  "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## 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 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## 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:3000/` in the browser.\n\n## Browser build\n\n  The browser build of superagent is located in the `./build` directory.\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## Wiki\n\n  For superagent extensions such as couchdb and oauth visit the [wiki](https://github.com/visionmedia/superagent/wiki).\n\n## License\n\n  MIT\n",
  "readmeFilename": "Readme.md",
  "bugs": {
    "url": "https://github.com/visionmedia/superagent/issues"
  },
  "_id": "superagent@0.15.4",
  "dist": {
    "shasum": "75ae4bc8878c05878cf540c644cb45c70fe148e2"
  },
  "_from": "superagent@>= 0.6.0",
  "_resolved": "https://registry.npmjs.org/superagent/-/superagent-0.15.4.tgz"
}
