Comparing version 0.2.3 to 0.2.4
@@ -55,3 +55,3 @@ 'use strict' | ||
var reqOptions = urlUtils.parse(url) | ||
reqOptions.method = options.method || 'GET' | ||
reqOptions.method = options.method || (options.data ? 'POST' : 'GET') | ||
reqOptions.headers = options.headers || options.header | ||
@@ -79,3 +79,2 @@ | ||
var req = transport.request(reqOptions, function (res) { | ||
var data = Buffer(0) | ||
@@ -82,0 +81,0 @@ res.on('data', function resOnData (chunk) { |
{ | ||
"name": "req-then", | ||
"author": "Lloyd Brookes <75pound@gmail.com>", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "Simple http(s) request function, returning a promise. ", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/req-then", |
'use strict' | ||
var http = require('http') | ||
var util = require('util') | ||
@@ -5,0 +4,0 @@ /* simple echo server.. useful for testing POST requests.. */ |
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
9229
144