Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

minimal-request-promise

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minimal-request-promise - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

index.js

@@ -55,2 +55,4 @@ /*global module, require, global */

}).then(function (parsedUrl) {
if (additionalOptions && additionalOptions.method && additionalOptions.method !== method)
throw new Error('Method can\'t be overridden');
var options = {};

@@ -57,0 +59,0 @@ mergeObjects(options, parsedUrl);

2

package.json
{
"name": "minimal-request-promise",
"version": "1.2.0",
"version": "1.2.1",
"description": "A+ Promise interface to Node.js HTTPS request, with no dependencies",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -56,2 +56,7 @@ /*global beforeEach, afterEach, describe, it, expect, require, jasmine */

});
it('rejects in case method is overridden', function () {
helper('https://npmjs.org', { method: 'PUT' }).catch(function (err) {
expect(err instanceof Error).toBeTruthy();
});
});
it('decomposes the URL into params', function (done) {

@@ -78,13 +83,2 @@ https.request.pipe(function (args) {

});
it('allows options to override method', function (done) {
https.request.pipe(function (args) {
expect(args).toEqual(jasmine.objectContaining({
method: 'ZOOM',
hostname: 'npmjs.org',
path: '/'
}));
done();
});
helper('https://npmjs.org', {method: 'ZOOM'});
});
it('allows options to override URL components', function (done) {

@@ -91,0 +85,0 @@ https.request.pipe(function (args) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc