{"name":"dhttp","version":"2.3.1","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"],"browser":"browser.js","files":["200.js","browser.js","index.js","parsers.js"],"main":"index.js","scripts":{"coverage-report":"nyc report --reporter=lcov","coverage":"nyc --check-coverage --branches 90 --functions 90 npm run unit","standard":"standard","test":"npm run standard && npm run coverage","bundle-test":"browserify test/index.js > test/bundle.js","unit":"tape test/*.js"},"dependencies":{"http-status-codes":"^1.1.6","parse-headers":"^2.0.1"},"devDependencies":{"nyc":"^6.4.0","standard":"*","tape":"^4.6.2"},"gitHead":"0c29a044b794f5b4386bef443f393aa59acd1b9a","_id":"dhttp@2.3.1","_shasum":"aa9dce66cd407a136696afadccb46163989f56f8","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.5.0","_npmUser":{"name":"dcousens","email":"email@dcousens.com"},"dist":{"shasum":"aa9dce66cd407a136696afadccb46163989f56f8","tarball":"http://registry-npm.ywwl.com/dhttp/download/dhttp-2.3.1.tgz","integrity":"sha512-U1hL1V8CURCp6vZeLLDB4+Azl07N5ETfMEo7UACs0McHzO6x/UCgFI3vJhv9502gR4kvt6pBspHr/SqxrAB+vg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID7pdmFNDCCssrU3c2uMlt2+zA9uaZbKlUh5CKmz7kQBAiEAt5vCqDtJwaTGNq43iU2qGXd1zufx3aQnMNYAUXEu/4A="}],"size":3592,"noattachment":false,"key":"/dhttp/-/dhttp-2.3.1.tgz"},"maintainers":[{"name":"dcousens","email":"email@dcousens.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/dhttp-2.3.1.tgz_1486627651365_0.31944750901311636"},"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":1486627651598,"_cnpm_publish_time":1486627651598,"dist-tags":{"latest":"3.0.3"}}