{"_id":"client-request","_rev":"15-b67d16d1bd501e913499f0d77a8d3eaf","name":"client-request","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","dist-tags":{"latest":"2.3.0"},"versions":{"1.0.0":{"name":"client-request","version":"1.0.0","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"62be02b466aa5f5cb935e1750c6b523c7978cb8f","_id":"client-request@1.0.0","_shasum":"3ec1b9d2881bfe7d4cf8ddd15fc6129e87a0a1cd","_from":".","_npmVersion":"2.9.0","_nodeVersion":"2.0.1","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"dist":{"shasum":"3ec1b9d2881bfe7d4cf8ddd15fc6129e87a0a1cd","tarball":"https://registry.npmjs.org/client-request/-/client-request-1.0.0.tgz","integrity":"sha512-m7DekqCmT8ChPSwVTTCpPlK7KE+p/V2jnCqV6/zshpfjc/ep3tWYgZHXhYFGdx2K9wHLyp2KrIxly91+4xd4og==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+eoz/APJU3UuAlSRUhm7oDKuvb0WJ28alXXb6pZ8iSgIgRMfZ96NGosghgikcXJ0m1A035FEGSoYkN6rI871xPy0="}]}},"1.0.1":{"name":"client-request","version":"1.0.1","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"b584a9ecde5267d47c8656df34d7bc83edb3a743","_id":"client-request@1.0.1","_shasum":"1c4799ccadc903f7b0b81b75b5754a91a91997b9","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"dist":{"shasum":"1c4799ccadc903f7b0b81b75b5754a91a91997b9","tarball":"https://registry.npmjs.org/client-request/-/client-request-1.0.1.tgz","integrity":"sha512-u7LVmvbJ1q9xi3njjxtqmzgzJGEwmmXbZiHoT/lGAcMSj2o06Vvc6DCr+P1MQximrrrLoyxItg21udzIEs2usg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3XoInLnRVHcgEstEa4xVEnstbxghtavoi0cVNB+zNMgIgDlEuKekUDZlrr+EEOIwAxjQXboapZRAqO0P75KH76yA="}]}},"1.1.0":{"name":"client-request","version":"1.1.0","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"afc577e4bbfbcd4036d9c691dcd8f23a7ca7157d","_id":"client-request@1.1.0","_shasum":"1deaaa6813f84512166b5cec5c95d2c8fe7045b7","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.5.1-pre","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"dist":{"shasum":"1deaaa6813f84512166b5cec5c95d2c8fe7045b7","tarball":"https://registry.npmjs.org/client-request/-/client-request-1.1.0.tgz","integrity":"sha512-JrZc01zvK5uXSwWmR84Vh8aVCfa/xudIsSKqIWRfuknWAA0Lcsw5uEnf8O2fTLRa7a5rvdLfYmkD9xodcgCqAQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGa74W50G+zDBYsbH2c6wxGg23JqaReqxt1RvIktlNuAAiA3c3J6F4xaJMcNJbWjL/WbGJhdawY46djRNdSJICuJww=="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/client-request-1.1.0.tgz_1474576862915_0.04683912801556289"}},"1.2.0":{"name":"client-request","version":"1.2.0","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"29398fb571c48a89ef5a3b00170158f4e8350d5a","_id":"client-request@1.2.0","_shasum":"472f3f2251babb470f5e2f309ec3ba776c1a60e2","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"dist":{"shasum":"472f3f2251babb470f5e2f309ec3ba776c1a60e2","tarball":"https://registry.npmjs.org/client-request/-/client-request-1.2.0.tgz","integrity":"sha512-ocXJAubCr0kJVk+GieM/ClyIi1dwFAlxXOCXfRER3J0DxAt1bxGMLdS5bVHXtXUZb3bwyBJb23s67VjjtRpnWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDtMy4gEoG7STaJqM6iLl636s94D//3GWJ7ihV82XtWbAiEAn6DKnAN0V/rSJWiXw+4Tz4hwFZm3748Vy9ZL667JSoA="}]},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/client-request-1.2.0.tgz_1479279266880_0.6188123852480203"}},"1.2.1":{"name":"client-request","version":"1.2.1","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"3dc4661a7ac2595bd6a4c985047e674bff6be749","_id":"client-request@1.2.1","_shasum":"9442b42130214ca59f207ef53d7456b347a699ed","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"dist":{"shasum":"9442b42130214ca59f207ef53d7456b347a699ed","tarball":"https://registry.npmjs.org/client-request/-/client-request-1.2.1.tgz","integrity":"sha512-qkqWn0JiWgFyKLQhmG9QnvS/G4HdudDPtnkk5i9KaNjuKk3VFbnDvLw+wntXzbrj74g1LraRnWP9e0i3PmvELQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXE/jl8gCJZbCG7DpLjz9LQBU2Z/29SydHIHIDjRk2NAIhAOr5qOKKr62ekaEK/y+SfL0fSGt0R84fYpAgf3/rRCPY"}]},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/client-request-1.2.1.tgz_1490998356014_0.7752017092425376"}},"1.2.2":{"name":"client-request","version":"1.2.2","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"65b8d876120d7e9d10f7f381c6df1d4d04467b0f","_id":"client-request@1.2.2","_shasum":"b6e4aacfcc2b5bc8157697fb8b7505f755f08f2e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"dist":{"shasum":"b6e4aacfcc2b5bc8157697fb8b7505f755f08f2e","tarball":"https://registry.npmjs.org/client-request/-/client-request-1.2.2.tgz","integrity":"sha512-G06Cf8MvSP4TeviU3iH7BCbI1NyewEtXZjf4tVfDu1XM2HG9mYLklLQODeHFmh0GzLMGWktQ6kEJglH5kLx5kA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxTtK6V0cQqlsCIWlULml5udbdh+D8O+JSx7k7N6jt8gIgWG1fzBnYZqTXGQcBWhdGpjxvDVBACj/i7SvXU0iCFnM="}]},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/client-request-1.2.2.tgz_1491372580374_0.8573423670604825"}},"2.0.0":{"name":"client-request","version":"2.0.0","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"8fd7cd217f947e58b6ddde26e573664c303cd0a5","_id":"client-request@2.0.0","_shasum":"32bb63c11a829f65e4ee5e7655abe8f276000c97","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"dist":{"shasum":"32bb63c11a829f65e4ee5e7655abe8f276000c97","tarball":"https://registry.npmjs.org/client-request/-/client-request-2.0.0.tgz","integrity":"sha512-Yfpq5dS2Ow65qOfaStryus4i5SM2yYYf4sC500QCHVnrZWUsjt+9eE1kAJlbi6iTbtTuXntUtMSB2LnIdN+m/w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfqFzf1iuDNsu5/B+wuWuCFvPmQoWI1dgo1mP0kTZgWAIgN5+5ywCxzogI1eXg+01lxTaCSjLgLICB94+yw/zEmrA="}]},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/client-request-2.0.0.tgz_1491494900654_0.8235592311248183"}},"2.1.0":{"name":"client-request","version":"2.1.0","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"f031d1a96f8811256feddf4948544fafc43b607d","_id":"client-request@2.1.0","_shasum":"7e1ad878e0e1a676556f5d5a1d6defdfdcf58921","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"dist":{"shasum":"7e1ad878e0e1a676556f5d5a1d6defdfdcf58921","tarball":"https://registry.npmjs.org/client-request/-/client-request-2.1.0.tgz","integrity":"sha512-i4ktcF+1AceUX2nU5eKxrOBYh66KlhF2SYfMiSfQnEXmIx5AMAYZgP1kPfXxcUOwP91n2lJYnmIXH7tL4qH7gA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEM7K+zpuk8nxV20CaQM5xCjcsY/wzZpN854sA2pDAezAiBp0E2WAhUKwhISmsuT/KPyqTodskydeIpvxRAh5IwBKg=="}]},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/client-request-2.1.0.tgz_1502306823830_0.2080066662747413"}},"2.2.0":{"name":"client-request","version":"2.2.0","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"stream-spigot":"~3.0.5","tape":"~4.0.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"63bb5beb0f64e69f84aff9d52660461c9f459859","_id":"client-request@2.2.0","_shasum":"a33fb3aaa2a99387383f249e35f947c59eb7e29e","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.1","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"dist":{"shasum":"a33fb3aaa2a99387383f249e35f947c59eb7e29e","tarball":"https://registry.npmjs.org/client-request/-/client-request-2.2.0.tgz","integrity":"sha512-n7jtkevBzdVEf0z8BYuK+nCj3dRB6G+T716EUu1JqcsdtLhQphVtzObMpWGzkp6pfwHuPPJeBMTEprS42NXMFQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+jXPGQ5GVcaNnCsjZA0tOimWOH+Fq9YMml7HObsuJLQIhAP4v2jrOfvDL8XeZod6DCtefNrglK8P19GyooMdbLRpI"}]},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/client-request-2.2.0.tgz_1502378338364_0.4884026632644236"}},"2.3.0":{"name":"client-request","version":"2.3.0","description":"A zero-dependency stripped-down http client request module based on the http://npm.im/request API","main":"request.js","directories":{"test":"test"},"scripts":{"test":"standard && node test/"},"keywords":["request","http","client","https"],"author":{"name":"Bryce B. Baril"},"license":"MIT","devDependencies":{"standard":"~10.0.3","stream-spigot":"~3.0.5","tape":"~4.8.0"},"dependencies":{},"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"homepage":"https://github.com/brycebaril/client-request","gitHead":"62d3814c40979364ef5b4b0d61c642fc1b566e70","_id":"client-request@2.3.0","_shasum":"c4604f71f81c94b280659579a17bbc0446fec212","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"bryce","email":"bryce@ravenwall.com"},"dist":{"shasum":"c4604f71f81c94b280659579a17bbc0446fec212","tarball":"https://registry.npmjs.org/client-request/-/client-request-2.3.0.tgz","integrity":"sha512-cHFF3C3XZ6ED7f22wAgvjnnVj5A+sXEYf7D5GCRmDUaH6D0QNnu3ZclUhSd1AoMyzgSN3IlyhI75q85onuIq3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbJsFzSpwKYYrz/xWLBaSLnarxwgRgh38o7Oq/md3xYQIhAK9STCAcgVcwz+oDzBewD7di8u3w2ppF9PoHP+j7ZPPF"}]},"maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/client-request-2.3.0.tgz_1507234699296_0.971431512851268"}}},"readme":"client-request\n=====\n\n[![NPM](https://nodei.co/npm/client-request.png)](https://nodei.co/npm/client-request/)\n\nSometimes you want to use a library that uses the (great!!) [request](http://npm.im/request) library but you can't have all those dependencies.\n\nThis library is a a very narrow subset of the common simpler uses of `request` that can be substituted for `request` without too much effort.\n\nFor the small subset of the `request` interface it implements, it is **super opinionated** and leaves any fancier features to you.\n\nJust to be clear, this module **does not even try** to implement most of the features of `request`.\n\nThings it does support from the `request` API:\n* **Only** this call form: `var req = request(options, callback)`\n* automatic selection of `http` or `https` based on the uri\n* options.timeout\n* options.json\n\nIf you want...\n* `request.form` -- use [form-urlencoded](https://www.npmjs.com/package/form-urlencoded), a zero-deps form body encoder. (example below)\n* `options.qs` -- use the core `querystring` library or [qs](http://npm.im/qs) and append the querystring to your url path prior to sending it to request\n* anything else ... find a module and suggest it here!\n\n\n```javascript\nvar request = require(\"client-request\")\n\nvar options = {\n  uri: \"http://brycebaril.com\",\n  method: \"POST\",\n  body: {blah: \"some stuff\"},\n  timeout: 100,\n  json: true\n}\n\nvar req = request(options, function callback(err, response, body) {\n  console.log(response.statusCode)\n  if (body) {\n    console.log(body)\n  }\n})\n\n```\n\n```javascript\nvar requestPromise = require(\"client-request/promise\")\n\nrequestPromise(options).then(function (result) {\n  if (result.response.statusCode === 201) {\n    console.log(result.response.headers.location)\n  } else {\n    console.log(result.body)\n  }\n}).catch(err){\n  console.log(err)\n})\n```\n\n```javascript\nvar requestPromise = require(\"client-request/promise\")\n\n// ONLY in ES2016 and later, you can await a promise in an async function (generator)\nasync function(){\n  try {\n    let result = await requestPromise(options)\n    console.log(result.response.headers.location)\n  } catch (err) {\n    console.log(err)\n  }\n}\n```\n\nWHY DID I MAKE THIS?\n===\n\n`request`\n```\nbryce@x1c:~/forks/request$ browserify --bare index.js -o bundle.js && wc -c bundle.js\n741099 bundle.js\n```\n\n`client-request`\n```\nbryce@x1c:~/forks/client-request$ browserify --bare request.js -o bundle.js && wc -c bundle.js\n6159 bundle.js\n```\n\nAPI\n===\n\n`var req = require(\"client-request\")(options, callback)`\n---\n\nPerform a client request. Returned value is the core `http` request object.\n\nThe `callback` is executed with three arguments `callback(err, response, body)`\n* err: any error when attempting to make the request, timeouts, or parse errors\n* response: the core http Response object\n* body: the `Buffer` returned by the server, or if `options.json` is used, the object the server's body deserializes into.\n\nOptions:\n* `uri` -- a full uri, e.g. \"https://example.com:9090/path?query=args\"\n* `method` -- GET, POST, PUT, etc. (Default GET)\n* (generally similar to the core `http.request` options)\n* `json` -- attempt to JSON.parse the response body and return the parsed object (or an error if it doesn't parse)\n* `timeout` -- a timeout in ms for the client to abort the request\n* `body` -- the raw body to send to the server (e.g. PUT or POST) -- if `body` is a string/buffer, it will send that, if `body` quacks like a stream, stream it, otherwise it will send it JSON serialized.\n* `stream` -- if `true` callback will return raw `http.ServerResponse` stream. Stream error handling will be up to you.\n\nExtensions\n===\n\nForms\n---\n\nI suggest [form-urlencoded](https://www.npmjs.com/package/form-urlencoded) for your form needs.\n\nCode with [request](http://npm.im/request):\n```js\nvar request = require(\"request\")\n\nvar form = {\n  alice: \"hi bob\",\n  bob: \"hi alice\"\n}\nvar options = {\n  uri: \"https://mysite.example\",\n  form: form,\n  method: \"PUT\",\n}\n\nvar req = request(options, function callback(err, response) {\n  // ...\n})\n```\n\nConverted to use `client-request`:\n\n```js\nvar request = require(\"request-client\")\nvar encodeForm = require(\"form-urlencoded\").encode\n\nvar form = {\n  alice: \"hi bob\",\n  bob: \"hi alice\"\n}\nvar options = {\n  uri: \"https://mysite.example\",\n  body: encodeForm(form),\n  method: \"PUT\",\n  headers: {\n    \"content-type\": \"application/x-www-form-urlencoded\"   // setting headers is up to *you*\n  }\n}\n\nvar req = request(options, function callback(err, response, body) {\n  // ...\n})\n```\n\nQuerystrings\n---\n\nIf it works for you, the core `querystring` module is a great way to avoid additional dependencies.\n\nCode with request:\n```js\nvar request = require(\"request\")\n\nvar qs = {\n  q: \"what?\",\n  page: 99\n}\nvar options = {\n  uri: \"https://mysite.example\",\n  qs: qs\n}\n\nvar req = request(options, function callback(err, response, body) {\n  // ...\n})\n```\n\n```js\nvar request = require(\"request-client\")\nvar encodeQuery = require(\"querystring\").encode\n\nvar qs = {\n  q: \"what?\",\n  page: 99\n}\nvar options = {\n  uri: \"https://mysite.example\" + \"?\" + encodeQuery(qs)\n}\n\nvar req = request(options, function callback(err, response, body) {\n  // ...\n})\n```\n\nLICENSE\n=======\n\nMIT\n","maintainers":[{"name":"bryce","email":"bryce@ravenwall.com"}],"time":{"modified":"2022-06-13T06:10:11.791Z","created":"2015-05-24T21:04:32.880Z","1.0.0":"2015-05-24T21:04:32.880Z","1.0.1":"2015-06-16T16:52:03.098Z","1.1.0":"2016-09-22T20:41:03.141Z","1.2.0":"2016-11-16T06:54:27.111Z","1.2.1":"2017-03-31T22:12:37.920Z","1.2.2":"2017-04-05T06:09:42.153Z","2.0.0":"2017-04-06T16:08:22.585Z","2.1.0":"2017-08-09T19:27:03.903Z","2.2.0":"2017-08-10T15:18:58.659Z","2.3.0":"2017-10-05T20:18:19.363Z"},"homepage":"https://github.com/brycebaril/client-request","keywords":["request","http","client","https"],"repository":{"type":"git","url":"git+https://github.com/brycebaril/client-request.git"},"author":{"name":"Bryce B. Baril"},"bugs":{"url":"https://github.com/brycebaril/client-request/issues"},"license":"MIT","readmeFilename":"README.md","users":{"nomemires":true,"laggingreflex":true,"hecto932":true}}