Comparing version 0.2.7 to 0.2.8
@@ -85,3 +85,3 @@ /** | ||
if (!args.content) { | ||
if (body && !(body instanceof String || body instanceof Buffer)) { | ||
if (body && !(body instanceof String || Buffer.isBuffer(body))) { | ||
body = qs.stringify(body); | ||
@@ -88,0 +88,0 @@ } |
{ | ||
"name": "urllib", | ||
"version": "0.2.7", | ||
"version": "0.2.8", | ||
"description": "Help in opening URLs (mostly HTTP) in a complex world — basic and digest authentication, redirections, cookies and more. Like python's _urllib_ module.", | ||
@@ -5,0 +5,0 @@ "keywords": [ "urllib", "http", "urlopen", "curl", "wget" ], |
@@ -212,3 +212,3 @@ /** | ||
it('should post big data', function (done) { | ||
it('should post big data with params.content', function (done) { | ||
var bigdata = new Buffer(1024 * 1024); | ||
@@ -226,2 +226,15 @@ urllib.request(host + '/post', { | ||
it('should post big data with params.data', function (done) { | ||
var bigdata = new Buffer(1024 * 1024); | ||
urllib.request(host + '/post', { | ||
type: 'post', | ||
data: bigdata | ||
}, function (err, data, res) { | ||
should.not.exist(err); | ||
res.should.status(200); | ||
data.should.length(bigdata.length); | ||
done(); | ||
}); | ||
}); | ||
it('should handle GET /wrongjson with dataType=json', function (done) { | ||
@@ -228,0 +241,0 @@ urllib.request(host + '/wrongjson', { |
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
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
19998
466
1