{"name":"dhttp","version":"3.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"],"browser":"browser.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":{"statuses":"^1.5.0"},"devDependencies":{"browserify":"^16.2.3","nyc":"^13.1.0","standard":"*","tape":"^4.9.1","typeforce":"^1.16.0"},"gitHead":"74d276793f31ae18455c1ab51ded3b4c8b243afc","_id":"dhttp@3.0.3","_npmVersion":"6.5.0","_nodeVersion":"11.5.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"integrity":"sha512-map1b8iyvxSv0uEw3DUDDK5XvH3aYA7QU9DcXy8e3FBIXSwHPHTZWVrOot7Iu9mieWq5XcrZemEJlob6IdCBmg==","shasum":"5a9ade18b13516293f10b73d78afdaf5272f1d13","tarball":"http://registry-npm.ywwl.com/dhttp/download/dhttp-3.0.3.tgz","fileCount":8,"unpackedSize":9596,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcGwz9CRA9TVsSAnZWagAAkaMP/2vtAmnooiUYeOPG++fi\nkKtVGN6/AUiHtuLV7CN/i+JwkdTiE+ZslBz9qNjqYKfUQnS/V5tiIJgmr3X4\n6Cw3K3b5kdunMwlJIqePMzhO3pkbP1P5JG8y4rARHGZJX2LchLgcN9LklO9B\nMSSdxeq2c8LiFiFuynHXHckDv62mkQFwq5MilZYukkAawfK5i6Uz2LMQyhY/\nRfTfSivR1x9Mpp3Kn2TADBgwXKvLw7vbOzaq3o+ekaatgS82e0y1nYk2V8Sa\n+yOKByjle0MXzPBxNee57KkOCAU5qcRCI909YMFCLnfGpaNbTlS9tY5A4SOK\nPV3fFfdxwfYc+Tdpzd7CctjSCXE6+qeRk9RZvpFzUnYiYhTpb1vmkRBVCpai\ncOpWyEQn79hgk3eVyyeztX2z7VnSqZCipliz+rmHq49qTEAAFKpeSrbWPyVa\n6l+twfxJDK7m01SkOuLe45wPfurTxst1+HKbgjbszDrOyz6tLjBmmbiOjODl\nE0/QWY3FVmXs9sxhBzU127e9VOJqF/5yIz3APH5hwDL/VMsJTIsR0Ohpc+9h\n1efGblcSn0HGu1yZU1WjJJhWu7LamAhcMo9641e4HmraKkKZ6kB6FleWduGa\ntN3rgA9gY3cUQSAFcNoKsCQT/+COrrQpnGs2vfQiAnix5EU05Pj9jctqk48J\nzYso\r\n=wX+V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIWcfRIzgpDbosRanmf46lJksCge3uxwjnrtpnntDxwAIgex+UEBAaNB74TDb6AQCKkH3DDItypMX7rpZK8ONc9z0="}],"size":3643,"noattachment":false,"key":"/dhttp/-/dhttp-3.0.3.tgz"},"maintainers":[{"name":"dcousens","email":"email@dcousens.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dhttp_3.0.3_1545276669053_0.1782649441008095"},"_hasShrinkwrap":false,"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":1545276669213,"_cnpm_publish_time":1545276669213,"dist-tags":{"latest":"3.0.3"}}