{"name":"nodemailer-fetch","version":"1.0.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.4.1","grunt":"^0.4.5","grunt-contrib-jshint":"^0.11.3","grunt-eslint":"^17.3.1","grunt-mocha-test":"^0.12.7","mocha":"^2.3.4"},"author":{"name":"Andris Reinman"},"license":"MIT","bugs":{"url":"https://github.com/nodemailer/nodemailer-fetch/issues"},"homepage":"https://github.com/nodemailer/nodemailer-fetch#readme","gitHead":"5dad34fe650019c409cb549335dfa222d21aca81","_id":"nodemailer-fetch@1.0.0","_shasum":"e448ea1a0260d03a66ffa9c634c48b8bc2d2710f","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.3.0","_npmUser":{"name":"andris","email":"andris@kreata.ee"},"dist":{"shasum":"e448ea1a0260d03a66ffa9c634c48b8bc2d2710f","tarball":"http://registry-npm.ywwl.com/nodemailer-fetch/download/nodemailer-fetch-1.0.0.tgz","integrity":"sha512-wzP77R33Ny6Lr5V6YvkB+4IHXc6m3tJNZ0/X92EvJeh0O7t9nlm8zx1ik8TyC1GkvYflSSZAaZFbMZUawkPYvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICGoj5u03LoRZVFKx2zTC/wzJ6c8ZcU/bJCrZKlhnBOoAiEA8vFlhomLOAHwWi2is4YgfRHBcbiROWXzm3fy91xIeAw="}],"size":10087,"noattachment":false,"key":"/nodemailer-fetch/-/nodemailer-fetch-1.0.0.tgz"},"maintainers":[{"name":"andris","email":"andris@kreata.ee"}],"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":1451476796310,"_cnpm_publish_time":1451476796310,"dist-tags":{"latest":"2.1.0"}}