{"name":"dhttp","version":"1.0.3","description":"Just another biased browserify-compatible HTTP/HTTPS wrapper","author":{"name":"Daniel Cousens"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/dcousens/dhttp.git"},"bugs":{"url":"https://github.com/dcousens/dhttp/issues"},"homepage":"https://github.com/dcousens/dhttp","keywords":["dhttp"],"main":"index.js","scripts":{"coverage":"mocha --require blanket -R travis-cov","coverage-local":"mocha --require blanket -R html-cov","standard":"standard","test":"npm run standard && npm run unit","unit":"mocha"},"config":{"blanket":{"pattern":[""],"data-cover-never":["node_modules","test"]},"travis-cov":{"threshold":100}},"dependencies":{},"devDependencies":{"blanket":"*","mocha":"*","standard":"*","travis-cov":"*"},"gitHead":"62622e83ec1211cb51b990e8c4b0d3f02cac9961","_id":"dhttp@1.0.3","_shasum":"fdd53676d1927ccb28d77b9ded7b9226b85af420","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.0.0","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"fdd53676d1927ccb28d77b9ded7b9226b85af420","tarball":"http://registry-npm.ywwl.com/dhttp/download/dhttp-1.0.3.tgz","integrity":"sha512-cJApPCsaWYFY18ph7f15UvU/cuaUIvoJTupxUzRRjaOBUWGOyJ9lEjKWNcpHCJtClr+4H6ZMFvO6u1V0tDMXEg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETDTL99mTYjnj2LuIGvK4bGYSsDTG4VZAE7DxIq2tpGAiEAw0NUGZt5sGTIbszW+Ax5GbACX1iretE5tXYElOMdz/c="}],"size":2835,"noattachment":false,"key":"/dhttp/-/dhttp-1.0.3.tgz"},"maintainers":[{"name":"dcousens","email":"email@dcousens.com"}],"directories":{},"deprecated":"Not maintained, don't use this","readme":"# dhttp\n\n[![TRAVIS](https://secure.travis-ci.org/dcousens/dhttp.png)](http://travis-ci.org/dcousens/dhttp)\n[![NPM](http://img.shields.io/npm/v/dhttp.svg)](https://www.npmjs.org/package/dhttp)\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nJust another biased browserify-compatible HTTP/HTTPS/XHR wrapper.\nNo compatability with IE.\n\nAutomatically parses `application/json`, `text/(plain|html)` and `application/octet-stream`.\n\n\n## Example\n\n``` javascript\nlet dhttp = require('dhttp')\n\n// ...\ndhttp({\n  method: 'GET',\n  url: 'http://localhost:8000'\n}, function (err, res) {\n  // err is only provided if the connection failed in some way\n  // OR if the content body parsing failed in some way\n  if (err) return\n  if (res.statusCode !== 200) return\n  if (res.headers['content-type'] !== 'application/json') return\n\n  // if `content-type` was not supported, expect body to be `null`\n  console.log(res.body)\n  // => { foo: 'bar' }, a parsed JSON object\n\n  // ...\n})\n```\n\nTo bypass `statusCode` handling, you can use `dhttp/200` which throws a descriptive error for any `statusCode` other than 200 using [`http-status-codes`](https://github.com/prettymuchbryce/node-http-status).\n\n``` javascript\nlet dhttp = require('dhttp/200')\n// ...\n```\n\n## LICENSE [MIT](LICENSE)\n","publish_time":1447026669109,"_cnpm_publish_time":1447026669109,"dist-tags":{"latest":"3.0.3"}}