{"_id":"minimal-request-promise","_rev":"13-ecd15cafee170a5f7593ab0bda3e8c61","name":"minimal-request-promise","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.0":{"name":"minimal-request-promise","version":"1.0.0","description":"no dependencies promise version of http request, handles trivial cases only (but then no deps)","main":"index.js","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic"},"license":"MIT","gitHead":"c4ed64caaae3f6c6e0286c9e8e0f433877c36b04","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"homepage":"https://github.com/gojko/minimal-request-promise#readme","_id":"minimal-request-promise@1.0.0","scripts":{},"_shasum":"d38bad4641859d739edf04ed024afa8e3118f28a","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"d38bad4641859d739edf04ed024afa8e3118f28a","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.0.0.tgz","integrity":"sha512-B511ak+t8f0mnZE3y4OihEApZ0lCSpbJiKI/vFazYAt5svEU1BPnzN0lcGm2lFWGE3Lefda8UBvNHwpvK5GHwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC9Uy6XxBeuuDYzfzPEUfj3rW6UYZElusyMkxj5y5Cr4gIgV9Labzz1ssTgxeN9YiHoc9yI2XhZNXuxnJHZXSv3XWU="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/minimal-request-promise-1.0.0.tgz_1464776192624_0.4823200940154493"}},"1.0.1":{"name":"minimal-request-promise","version":"1.0.1","description":"no dependencies promise version of http request, handles trivial cases only (but then no deps)","main":"index.js","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic"},"license":"MIT","gitHead":"260fa42dd30fdaadd09779bd39096bdf022a2804","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"homepage":"https://github.com/gojko/minimal-request-promise#readme","_id":"minimal-request-promise@1.0.1","scripts":{},"_shasum":"76b3a48bb8539fcf1d80d3d5bb2ce34895b90834","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"76b3a48bb8539fcf1d80d3d5bb2ce34895b90834","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.0.1.tgz","integrity":"sha512-JNDXKNHi0ZcjUkcCn6U6wBp1IEwhDSUNRVEWeSSExTdnibx2LuOLX/e7sedaHaGX6+qx+VyRsKTY5osHijlPhA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEklSUnF215hTpGswevpl9FxXzmdbjA8kEj5yJpUFjdPAiBXJI1I6j+G7vOM/st4GgcKSTiRCtzGhc3yDocD6b+8nw=="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/minimal-request-promise-1.0.1.tgz_1464848294641_0.21453551342710853"}},"1.0.2":{"name":"minimal-request-promise","version":"1.0.2","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","gitHead":"f7a297bc171220e65213fb345488602945e737e8","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.0.2","scripts":{},"_shasum":"d7e2a829a212e342f663d09207ba48236279a8ae","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"d7e2a829a212e342f663d09207ba48236279a8ae","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.0.2.tgz","integrity":"sha512-96TgvjjXcpEG5nerfuNgWZFyAMEjtLUvUsb7zCTUhhjtpGMf3fVeKXmt233L8hFOuVnyDh1Qln7wgOIZpwXnPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCepMOEvydfelV7I4tRxYLfFCCW5piN+85oL1Fn8cEsRwIhAJMgGXf9WupYWKN3BEqfKAXZoq6mwpftriZ6QHVQLWOW"}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/minimal-request-promise-1.0.2.tgz_1464851487128_0.43983566341921687"}},"1.1.0":{"name":"minimal-request-promise","version":"1.1.0","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"scripts":{"test":"node spec/support/jasmine-runner.js"},"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","devDependencies":{"fake-http-request":"^1.2.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0"},"gitHead":"5cea33f9230ce0e7f7eae551c2c859c58b7c28d8","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.1.0","_shasum":"95009ee01b1e117e2ed01e147d4796fb66119a2e","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"95009ee01b1e117e2ed01e147d4796fb66119a2e","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.1.0.tgz","integrity":"sha512-+P9nK15cu1UDXXi3RLshmvL0IDQmVJzmA3mIh92pka+s8NoNNK+64V2/Gn33UU2qbe1Qp+fbaXc6keDdIHbDwQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQConF8AJvZLWhGOqBpGMVGmkZTDvLi9MduqgRbFg0mP2wIgIu+50yuX09LkT79XcDUiSUw/ANyR4YT+jBDxkzMtXmo="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/minimal-request-promise-1.1.0.tgz_1464990142686_0.7419730271212757"}},"1.2.0":{"name":"minimal-request-promise","version":"1.2.0","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"scripts":{"test":"node spec/support/jasmine-runner.js"},"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","devDependencies":{"fake-http-request":"^1.3.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0"},"gitHead":"8eb09f4f22906c502a2f8aff95079df39fd35162","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.2.0","_shasum":"8cca7d8d41669e6946d3a0fa9e348aea4170d459","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"8cca7d8d41669e6946d3a0fa9e348aea4170d459","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.2.0.tgz","integrity":"sha512-0kRxREzHDI6G5aDTRKi12U68ViAtMD+Jm6UkEcsRhBu6Yz/MPfW17UfGWLM1vnDjHthp/1lXkhU8HY1d7lZ2gw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgOyqUWb1HDWIQU1d3si4XaqrH94hXDNKHyDkwKmqouAiEAoVZejRuHRq5w06UU7A/+cOTVKbs9IM6UgsMp4rXoZRw="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/minimal-request-promise-1.2.0.tgz_1467984568411_0.25223393691703677"}},"1.2.1":{"name":"minimal-request-promise","version":"1.2.1","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"scripts":{"test":"node spec/support/jasmine-runner.js"},"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","devDependencies":{"fake-http-request":"^1.3.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0"},"gitHead":"009cb9010f534a1d8b031efdc6b8c184c4140e5f","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.2.1","_shasum":"f6f52c08fb9fed7300482948b85b3b3afd730bcd","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"f6f52c08fb9fed7300482948b85b3b3afd730bcd","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.2.1.tgz","integrity":"sha512-hvDFGXdxDldvPXLooh5Me1ydHx+Tc13c0FitP0zH5twH2z4hf0YFL+oXiNvKU8+aLWo/PHo+ePhFBLzMOhRrqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYBIPNKwYWf0bv3lzCEMZBqxfnJQjNE6sbaFGqxkjdhAiAczxPHo7ZShpC52n1lr+8q1ODTCYM9nCn3r0KLSqDKzg=="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/minimal-request-promise-1.2.1.tgz_1468014174776_0.6763152275234461"}},"1.3.0":{"name":"minimal-request-promise","version":"1.3.0","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"scripts":{"test":"node spec/support/jasmine-runner.js"},"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","devDependencies":{"fake-http-request":"^1.3.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0"},"gitHead":"e1c3c4394df428091ab2d164d383a61ad04b87be","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.3.0","_shasum":"4594ac0d82a1f4bfaba6c566c00b047ac302cfd4","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"4594ac0d82a1f4bfaba6c566c00b047ac302cfd4","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.3.0.tgz","integrity":"sha512-eaD7GFjLCG9glxI1UOXqsKjAUAau9JIMUAG+39sT/MSqJgGP3AJuYjAyEvhgYjSBiK+ROU5cPoaiwx/C6OV2uw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCI9cPEkl8PJ0/C+9003cdXazfFOnc3HWU0l8NbY2VmLQIgY9mcp+i4bUUbT5EFJbked5Qnp/dWRQXFVYWe5/5ZOyo="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/minimal-request-promise-1.3.0.tgz_1468306712556_0.7830358608625829"}},"1.4.0":{"name":"minimal-request-promise","version":"1.4.0","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"scripts":{"test":"node spec/support/jasmine-runner.js"},"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","devDependencies":{"fake-http-request":"^1.3.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0"},"gitHead":"a7654ec71c7a2e19f84fcfef70d9d9942f650965","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.4.0","_shasum":"04b009180537440b3f82689a4bfbf8624268e07f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"04b009180537440b3f82689a4bfbf8624268e07f","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.4.0.tgz","integrity":"sha512-Tt+u4FSW5NAsfrfnJkulV/wS0SYA4lh+AMbCntSnNvJCOdts4EKbLSs1D9GQ7FAlv6V+QYuQ4HaDPJqExOzGuw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3EjZq0fsy9Mfbbo6iZIJAGaL3HwQbqji/hbhTQfyjrgIgIxAHY2KvEa5NPR+WSQuUoVoJhEwg60paHij2Vg9H618="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minimal-request-promise-1.4.0.tgz_1495724263050_0.8872923874296248"}},"1.4.1":{"name":"minimal-request-promise","version":"1.4.1","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"scripts":{"test":"node spec/support/jasmine-runner.js"},"files":["index.js"],"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","devDependencies":{"fake-http-request":"^1.3.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0"},"gitHead":"fd001fdbf50c206a0f17db16db6b99ffd59a6482","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.4.1","_shasum":"4036033c33b995a822e15ffc8c3f1e2e9d052352","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"4036033c33b995a822e15ffc8c3f1e2e9d052352","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.4.1.tgz","integrity":"sha512-kmVkMWocepXEt1gcSHPWd++lAgqQZfn5fm+FHkGbRVER88E5S9JclqZ+T5Y2xJRpemk/6VNz/WQ8WELD2dhnMg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWOiKAMSt8Jt0yDq/3N++ENXNo8WLeZ95ET5KkPie+fAiAcX+Qc105K1A1hJhwjWua3khRwAxVgLMYuIffTdjPZLg=="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minimal-request-promise-1.4.1.tgz_1508162961406_0.418568886583671"}},"1.5.0":{"name":"minimal-request-promise","version":"1.5.0","description":"A+ Promise interface to Node.js HTTPS request, with no dependencies","main":"index.js","keywords":["promise","http","https","request","post","rest"],"scripts":{"test":"node spec/support/jasmine-runner.js"},"files":["index.js"],"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"license":"MIT","devDependencies":{"fake-http-request":"^1.3.0","jasmine":"^2.4.1","jasmine-spec-reporter":"^2.4.0"},"gitHead":"d66f3376188828a80780519a18bb1d0d1aeb7f5b","bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"_id":"minimal-request-promise@1.5.0","_shasum":"60f5d7f55b4026d197074e2e155626d4cc5c2ebc","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"gojko","email":"gojko@gojko.com"},"dist":{"shasum":"60f5d7f55b4026d197074e2e155626d4cc5c2ebc","tarball":"https://registry.npmjs.org/minimal-request-promise/-/minimal-request-promise-1.5.0.tgz","integrity":"sha512-/yNNjR3sxetX7sdX1f9ttHfDjajNKpngpz9ir3jZwKAT+I4tfBOqAiFNIEdDthU/mTd4osaO1HuU/GwR8iNJyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7i8ANvm+2MU83YUAsD8Rnnl8QSToUq7Lbs08Jqfx0zAIgLSaiaSv0MVyHmV1fkqveCc9iuAB1Djc5bgFb/gXHoyA="}]},"maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/minimal-request-promise-1.5.0.tgz_1508956992677_0.7709758833516389"}}},"readme":"# Minimal Promise version of HTTPS request\n\n[![Build Status](https://travis-ci.org/gojko/minimal-request-promise.svg?branch=master)](https://travis-ci.org/gojko/minimal-request-promise)\n\nThis is a wrapper for the standard HTTPS Node Request object, that provides an A+ Promise interface to request execution and automates the process of assembling the response body as a string. It can handle posting body contents, and automatically rejects the promise if the response code is not between 200 and 399.\n\nThe intent of this library is to wrap requests into a promise interface with minimal overhead, with no dependencies, and just expose the standard Node.js arguments.\nIt's not trying to be a fully-featured replacement for complex workflows, streaming etc. For more complex libraries that can provide all kind of workflows like that, see [request-promise](https://github.com/request/request-promise) and [got](https://github.com/sindresorhus/got).\n\n## Installation\n\nInstall using NPM:\n\n```bash\nnpm install minimal-request-promise\n```\n\n[![NPM](https://nodei.co/npm/minimal-request-promise.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/minimal-request-promise/)\n\n## Usage\n\nYou can use the standard Node [HTTPS Request Options](https://nodejs.org/api/https.html#https_https_request_options_callback), with the following additional options:\n\n* `body`: `string`, the content to include in the request body when posting\n* `resolveErrors`: `boolean`, if true, HTTP error response codes will result in a resolved promise (instead of rejected). Only network errors will result in a rejected promise. If false (default), network errors and successful HTTP requests with an error response code will cause the promise to be rejected.\n* `timeout`: `number`, Integer containing the number of milliseconds to wait for a\nserver to send response headers (and start the response body) before aborting\nthe request. Note that if the underlying TCP connection cannot be established,\nthe OS-wide TCP connection timeout will overrule the `timeout` option ([the\ndefault in Linux can be anywhere from 20-120 seconds][linux-timeout]).\n\nIf you want to execute a FORM POST, remember to add the [`Content-Length` header](https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13) as well. This library intentionally does not automatically add that, to keep the interface in line with standard Node.JS requests.\n\n## Example\n\n```javascript\n\nvar requestPromise = require('minimal-request-promise'),\n  options = {\n    method: 'POST',\n    hostname: 'graph.facebook.com',\n    path: '/v2.6/me/messages?access_token=' + fbAccessToken,\n    port: 443,\n    headers: {\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      recipient: {\n        id: recipient\n      },\n      message: message\n    })\n  };\n\nrequestPromise(options).then(\n  function (response) {\n    console.log('got response', response.body, response.headers);\n  },\n  function (response) {\n    console.log('got error', response.body, response.headers, response.statusCode, response.statusMessage);\n  }\n);\n\n```\n\n## GET, POST, PUT and DELETE method shortcuts\n\nIn addition to using the standard Node.js request parameters, you can also generate basic parameters from URLS for GET and POST using the helper methods. The helper methods are `.get`, `.post`, `.put` and `.delete` and they expect the following arguments:\n\n* `url`: `string`, a URL to GET, POST, PUT or DELETE to\n* `options`: _(optional)_ `object`, key-value map of additional options, described in the [Usage](#usage) section\n* `Promise`: _(optional)_ `Function`, an alternate Promise implementation. See [Using with a different Promise library](#using-with-a-different-promise-library).\n\nExample:\n\n```javascript\nvar requestPromise = require('minimal-request-promise'),\n  options = {\n    headers: {\n      'Content-Type': 'application/json'\n    },\n    body: JSON.stringify({\n      recipient: {\n        id: recipient\n      },\n      message: message\n    })\n  };\n\nrequestPromise.post('https://graph.facebook.com/v2.6/me/messages?access_token=' + fbAccessToken, options).then(\n  function (response) {\n    console.log('got response', response.body, response.headers);\n  },\n  function (response) {\n    console.log('got error', response.body, response.headers, response.statusCode, response.statusMessage);\n  }\n);\n```\n\n## Using with a different Promise library\n\nBy default, this library uses the built-in `Promise` from Node.js. If you'd like to use a different A+ Promise library, just pass it in as the second argument. For example:\n\n```javascript\nvar bluebird = require('bluebird'),\n  requestPromise = require('minimal-request-promise'),\n  options = {\n   // some options here ...\n  };\nrequestPromise(options, bluebird).then(report);\n```\n\n## License\n\nMIT\n","maintainers":[{"name":"gojko","email":"gojko@gojko.com"}],"time":{"modified":"2022-06-19T21:18:15.995Z","created":"2016-06-01T10:16:34.913Z","1.0.0":"2016-06-01T10:16:34.913Z","1.0.1":"2016-06-02T06:18:16.808Z","1.0.2":"2016-06-02T07:11:28.341Z","1.1.0":"2016-06-03T21:42:24.971Z","1.2.0":"2016-07-08T13:29:30.799Z","1.2.1":"2016-07-08T21:42:57.363Z","1.3.0":"2016-07-12T06:58:35.505Z","1.4.0":"2017-05-25T14:57:43.975Z","1.4.1":"2017-10-16T14:09:22.396Z","1.5.0":"2017-10-25T18:43:13.584Z"},"homepage":"https://github.com/gojko/minimal-request-promise","repository":{"type":"git","url":"git+https://github.com/gojko/minimal-request-promise.git"},"author":{"name":"Gojko Adzic","email":"gojko@gojko.com"},"bugs":{"url":"https://github.com/gojko/minimal-request-promise/issues"},"license":"MIT","readmeFilename":"README.md","keywords":["promise","http","https","request","post","rest"],"users":{"gojko":true}}