{"name":"nodemailer-fetch","version":"1.4.0","description":"GET HTTP contents","main":"lib/fetch.js","scripts":{"test":"grunt"},"repository":{"type":"git","url":"git+https://github.com/nodemailer/nodemailer-fetch.git"},"keywords":["nodemailer","http"],"devDependencies":{"chai":"^3.5.0","grunt":"^0.4.5","grunt-eslint":"^17.3.2","grunt-mocha-test":"^0.12.7","mocha":"^2.4.5"},"author":{"name":"Andris Reinman"},"license":"MIT","bugs":{"url":"https://github.com/nodemailer/nodemailer-fetch/issues"},"homepage":"https://github.com/nodemailer/nodemailer-fetch#readme","gitHead":"bc259759f086ccb56f5b6d9d59de65ba7a906582","_id":"nodemailer-fetch@1.4.0","_shasum":"08a6174f755aba6ad9d88133355a70c1dee4e698","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.5.0","_npmUser":{"name":"andris","email":"andris@kreata.ee"},"dist":{"shasum":"08a6174f755aba6ad9d88133355a70c1dee4e698","tarball":"http://registry-npm.ywwl.com/nodemailer-fetch/download/nodemailer-fetch-1.4.0.tgz","integrity":"sha512-DEjzbHYWoe8UmSarq3TgflIUBBAE0EmYRRgvwnK9N4LPJnsJUEIy1jFpBNVjdA99QrQkQiL3v1WkfYFS9tGmPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEQhPtkHx0gO7nL3uMgA/quDHxOBRPHPtlA7KWQQrqGXAiEAzXXn4YFMIvlQS2zM1OnQI/5j31tPAb0Z4q1CakvaXfo="}],"size":11931,"noattachment":false,"key":"/nodemailer-fetch/-/nodemailer-fetch-1.4.0.tgz"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/nodemailer-fetch-1.4.0.tgz_1455203188618_0.09175424068234861"},"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":1455203190383,"_cnpm_publish_time":1455203190383,"dist-tags":{"latest":"2.1.0"}}