{"name":"nodemailer-fetch","version":"1.6.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-eslint":"^19.0.0","grunt-mocha-test":"^0.12.7","mocha":"^3.0.2"},"author":{"name":"Andris Reinman"},"license":"MIT","bugs":{"url":"https://github.com/nodemailer/nodemailer-fetch/issues"},"homepage":"https://github.com/nodemailer/nodemailer-fetch#readme","gitHead":"581580f1b21c61c10a3296c249f90d436fac8926","_id":"nodemailer-fetch@1.6.0","_shasum":"79c4908a1c0f5f375b73fe888da9828f6dc963a4","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.3.1","_npmUser":{"name":"andris","email":"andris@kreata.ee"},"dist":{"shasum":"79c4908a1c0f5f375b73fe888da9828f6dc963a4","tarball":"http://registry-npm.ywwl.com/nodemailer-fetch/download/nodemailer-fetch-1.6.0.tgz","integrity":"sha512-P7S5CEVGAmDrrpn351aXOLYs1R/7fD5NamfMCHyi6WIkbjS2eeZUB/TkuvpOQr0bvRZicVqo59+8wbhR3yrJbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTNsH3Sd/kcG+jc4jLyHkFeVx1tltPmWjoueh8/8autAIhAOqROYiC5AmxMn0uJPG1uXt+X5gWqqkHhG4olEZXlZT3"}],"size":12265,"noattachment":false,"key":"/nodemailer-fetch/-/nodemailer-fetch-1.6.0.tgz"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/nodemailer-fetch-1.6.0.tgz_1471509114442_0.5888715244363993"},"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":1471509115997,"_cnpm_publish_time":1471509115997,"dist-tags":{"latest":"2.1.0"}}