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

http-browserify

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-browserify - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

6

lib/request.js

@@ -18,3 +18,7 @@ var Stream = require('stream');

try { xhr.withCredentials = true }
if (typeof params.withCredentials === 'undefined') {
params.withCredentials = true;
}
try { xhr.withCredentials = params.withCredentials }
catch (e) {}

@@ -21,0 +25,0 @@

2

package.json
{
"name": "http-browserify",
"version": "1.3.0",
"version": "1.3.1",
"description": "http module compatability for browserify",

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

@@ -59,2 +59,17 @@ global.window = {

})
});
test('Test withCredentials param', function(t) {
var url = '/api/foo';
var request = http.request({ url: url, withCredentials: false }, noop);
t.equal( request.xhr.withCredentials, false, 'xhr.withCredentials should be false');
var request = http.request({ url: url, withCredentials: true }, noop);
t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true');
var request = http.request({ url: url }, noop);
t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true');
t.end();
});
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