{"name":"dhttp","version":"3.0.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","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":{"body-parser":"^1.18.3","express":"^4.16.3","nyc":"^6.4.0","standard":"*","tape":"^4.9.1"},"gitHead":"9982edb8e44e222de42717ed8377c781f1bedcbb","_id":"dhttp@3.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"dcousens","email":"npm@dcousens.com"},"dist":{"integrity":"sha512-eQNhUtLAnWMyY03vcwnyTzY1onNzchZk7W3UgGCA2kqt/PTnDA5Pix+XBFIpwg7WhLia0HicjTWFCgQ3Km8EuQ==","shasum":"08f39a66c3d89bf6f0b6d2577f5bbf560dbfd59e","tarball":"http://registry-npm.ywwl.com/dhttp/download/dhttp-3.0.1.tgz","fileCount":8,"unpackedSize":9459,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbqHAlCRA9TVsSAnZWagAAH50P/34/iwvQErn3wckRTowh\nXuxXc+mGxYAdGStQTGLhgF985BV7ph7UJHt40oBNLEFVZw/LDyHcaAgMI5cT\nHbga6nhgI6rpJ7LvyscIUF8bXBDunA++ITFgbvRmyi+Ofv6dWtpKir4LCj3L\noEgPbYbAcAkCIbb6rzTkS0UD/DDgFmjqdzTMVzuw+UMnYU1cKxdljOw+3Xd3\nEQAO1NXx2rvIcLpSa5rxZfDsRWSFY6dHW0TxZdFUpBfnFDYsPM3HtUH1DbwE\nI+RQMMOozYzIdus5dekIxzkvQgVgoYj+xPkeb3ERbL+xsGmqB/09l7OS332Q\nk8IDA3Pjqi4SIRPnnfIt9xBkOwxg+y/g5Q+Cxf8gst8TnyJMrPmsoREIrHKJ\nYkXZZLPcIyWGbxldnxXPEbsPPPqTm7h6u6cQEKLHGyzYV84qYZG73MAmJ+Jc\nLAaFtnpkzLQEEhMa2moL6cqsX7nXhqoiXITeh6Ii9aYS55ORbhh69SOoOy+Z\nGD+lYwtmpBPAiPntGlechhVAf/MQVuS8fHsuLld41/KHUQ1agrPEVhnGfRrv\nNqQkunsoD/VsrZVMRRiply9EpJ8/vQvMUE01WbQWMhf7sen2aaeQq2AdqVe/\nH3AZeUn7w3Ysz91Okx5PYCbPmTzP+kiV+O7+NjInvOdl+yJpUDoAGk/PFdQq\npvSF\r\n=Odki\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXZtiHBm+HaWXFztagpEkfczToPEaqNgKACqCTaCshXwIhAOBVLEVUPUmOgZKiRi7mB57DUfysU/wqk7Qo4QKH1jVf"}],"size":3585,"noattachment":false,"key":"/dhttp/-/dhttp-3.0.1.tgz"},"maintainers":[{"name":"dcousens","email":"email@dcousens.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/dhttp_3.0.1_1537765413100_0.3893180860592196"},"_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":1537765413253,"_cnpm_publish_time":1537765413253,"dist-tags":{"latest":"3.0.3"}}