{"name":"nodemailer-fetch","version":"2.0.0","description":"GET HTTP contents","main":"lib/fetch.js","scripts":{"test":"grunt mochaTest"},"repository":{"type":"git","url":"git+https://github.com/nodemailer/nodemailer-fetch.git"},"keywords":["nodemailer","http"],"devDependencies":{"chai":"^3.5.0","grunt":"^1.0.1","grunt-cli":"^1.2.0","grunt-eslint":"^19.0.0","grunt-mocha-test":"^0.13.2","mocha":"^3.1.0"},"author":{"name":"Andris Reinman"},"license":"MIT","bugs":{"url":"https://github.com/nodemailer/nodemailer-fetch/issues"},"homepage":"https://github.com/nodemailer/nodemailer-fetch#readme","gitHead":"ca1e6da577d01c3c401bc04b3f5b2ef38f933e4d","_id":"nodemailer-fetch@2.0.0","_shasum":"3e4c4788c0830542ae6d0c1fa95b656e2d86cc90","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"andris","email":"andris@kreata.ee"},"dist":{"shasum":"3e4c4788c0830542ae6d0c1fa95b656e2d86cc90","tarball":"http://registry-npm.ywwl.com/nodemailer-fetch/download/nodemailer-fetch-2.0.0.tgz","integrity":"sha512-5UfCld9zGbY1xJaoLUSbCbPC3gDn4tzLUIe1sR5FDy+nFgjarNRFGEMUCnylv8/hD68LKshWH+A9SiM8jmfjZA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbhfoTFkZ6PZVAbNGMiCyMiIP1M3LGVdv2rqCljRU8WAIhALhZ1GULcAA6ycZ2IGCHXAKWFS7aTfSGI28NVchmlyvX"}],"size":12463,"noattachment":false,"key":"/nodemailer-fetch/-/nodemailer-fetch-2.0.0.tgz"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nodemailer-fetch-2.0.0.tgz_1475147424540_0.08177585853263736"},"directories":{},"readme":"# nodemailer-fetch\n\nFetches HTTP URL contents for [nodemailer](https://github.com/nodemailer/nodemailer).\n\n[![Build Status](https://secure.travis-ci.org/nodemailer/nodemailer-fetch.svg)](http://travis-ci.org/nodemailer/nodemailer-fetch)\n<a href=\"http://badge.fury.io/js/nodemailer-fetch\"><img src=\"https://badge.fury.io/js/nodemailer-fetch.svg\" alt=\"NPM version\" height=\"18\"></a>\n\n## Usage\n\n```javascript\nvar fetch = require('nodemailer-fetch');\nfetch('http://www.google.com/').pipe(process.stdout);\n```\n\nThe method takes the destination URL as the first and optional options object as the second argument.\n\nThe defaults are the following:\n\n  * Default method is GET\n  * Basic auth is supported\n  * Up to 5 redirects are followed (Basic auth gets lost after first redirect)\n  * gzip is handled if present\n  * Cookies are supported\n  * No shared HTTP Agent\n  * Invalid SSL certs are allowed. Can be overwritten with the `tls` option\n\n### options\n\nPossible options are the following:\n\n  * **userAgent** a string defining the User Agent of the request (by default not set)\n  * **cookie** a cookie string or an array of cookie strings where a cookie is the value used by 'Set-Cookie' header\n  * **maxRedirects** how many redirects to allow (defaults to 5, set to 0 to disable redirects entirely)\n  * **method** HTTP method to use, defaults to GET (if `body` is set defaults to POST)\n  * **body** HTTP payload to send. If the value is an object it is converted to an *x-www-form-urlencoded* payload, other values are passed as is. Unlike authentication data payload and method is preserved between redirects\n  * **contentType** optional content type for the HTTP payload. Defaults to *x-www-form-urlencoded*. If the value is `false` then Content-Type header is not set\n  * **tls** optional object of TLS options\n  * **timeout** (milliseconds) sets timeout for the connection. Returns an error if timeout occurs\n  * **headers** custom headers as an object where key is the header key and value is either a string or an array of strings for multiple values\n  * **allowErrorResponse** of true then processes response even if the response code is non 2xx\n\n  ```javascript\n  var fetch = require('nodemailer-fetch');\n  fetch('http://www.google.com/', {\n      cookie: [\n          'cookie_name1=cookie_value1',\n          'cookie_name2=cookie_value2; expires=Sun, 16 Jul 3567 06:23:41 GMT',\n      ],\n      userAgent: 'MyFetcher/1.0'\n  }).pipe(process.stdout);\n  ```\n\n> Cookies are domain specific like normal browser cookies, so if a redirect happens to another domain, then cookies are not passed to it, HTTPS-only cookies are not passed to HTTP etc.\n\n## License\n**MIT**\n","publish_time":1475147426533,"_cnpm_publish_time":1475147426533,"dist-tags":{"latest":"2.1.0"}}