stream-http
Advanced tools
Comparing version 1.2.1 to 1.3.0
@@ -28,5 +28,2 @@ var ClientRequest = require('./lib/request') | ||
if (opts.withCredentials === undefined) | ||
opts.withCredentials = true | ||
// Also valid opts.auth, opts.mode | ||
@@ -33,0 +30,0 @@ |
@@ -122,3 +122,3 @@ // var Base64 = require('Base64') | ||
mode: 'cors', | ||
credentials: opts.withCredentials ? 'include' : 'omit' | ||
credentials: opts.withCredentials ? 'include' : 'same-origin' | ||
}).then(function (response) { | ||
@@ -125,0 +125,0 @@ self._fetchResponse = response |
{ | ||
"name": "stream-http", | ||
"version": "1.2.1", | ||
"version": "1.3.0", | ||
"description": "Streaming http in the browser", | ||
@@ -18,2 +18,9 @@ "main": "index.js", | ||
"license": "MIT", | ||
"keywords": [ | ||
"http", | ||
"stream", | ||
"streaming", | ||
"xhr", | ||
"http-browserify" | ||
], | ||
"dependencies": { | ||
@@ -30,2 +37,3 @@ "builtin-status-codes": "~1.0.0", | ||
"brfs": "^1.4.0", | ||
"cookie-parser": "^1.3.5", | ||
"express": "^4.13.0", | ||
@@ -32,0 +40,0 @@ "tape": "^4.0.0", |
@@ -88,3 +88,3 @@ // These tests are teken from http-browserify to ensure compatibility with | ||
var request = http.get({ url: url }, noop) | ||
t.equal( request._xhr.withCredentials, true, 'xhr.withCredentials should be true') | ||
t.equal( request._xhr.withCredentials, false, 'xhr.withCredentials should be false') | ||
@@ -91,0 +91,0 @@ t.end() |
@@ -0,1 +1,2 @@ | ||
var cookieParser = require('cookie-parser') | ||
var basicAuth = require('basic-auth') | ||
@@ -49,2 +50,8 @@ var express = require('express') | ||
app.get('/cookie', cookieParser(), function (req, res) { | ||
res.setHeader('Content-Type', 'text/plain') | ||
res.write('hello=' + req.cookies.hello) | ||
res.end() | ||
}) | ||
app.get('/auth', function (req, res) { | ||
@@ -51,0 +58,0 @@ var user = basicAuth(req) |
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
68231
27
957
7