nodemailer-fetch
Advanced tools
Comparing version 1.5.0 to 1.6.0
# Changelog | ||
## v1.6.0 2016-08-18 | ||
* Added new option `headers` | ||
## v1.5.0 2016-08-18 | ||
@@ -4,0 +8,0 @@ |
@@ -46,2 +46,6 @@ 'use strict'; | ||
Object.keys(options.headers || {}).forEach(function (key) { | ||
headers[key.toLowerCase().trim()] = options.headers[key]; | ||
}); | ||
if (options.userAgent) { | ||
@@ -60,3 +64,5 @@ headers['User-Agent'] = options.userAgent; | ||
if (options.body) { | ||
headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded'; | ||
if (options.contentType !== false) { | ||
headers['Content-Type'] = options.contentType || 'application/x-www-form-urlencoded'; | ||
} | ||
@@ -63,0 +69,0 @@ if (typeof options.body.pipe === 'function') { |
{ | ||
"name": "nodemailer-fetch", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"description": "GET HTTP contents", | ||
"main": "lib/fetch.js", | ||
"scripts": { | ||
"test": "grunt" | ||
"test": "grunt mochaTest" | ||
}, | ||
@@ -9,0 +9,0 @@ "repository": { |
@@ -36,5 +36,6 @@ # nodemailer-fetch | ||
* **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 | ||
* **contentType** optional content type for the HTTP payload. Defaults to *x-www-form-urlencoded* | ||
* **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 | ||
* **tls** optional object of TLS options | ||
* **timeout** (milliseconds) sets timeout for the connection. Returns an error if timeout occurs | ||
* **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 | ||
@@ -41,0 +42,0 @@ ```javascript |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50541
1288
56