particle-api-js
Advanced tools
Comparing version 11.1.0 to 11.1.1
# changelog | ||
## 11.1.1 - 5 November 2024 | ||
* Workaround for Firefox failing to open multiple event streams | ||
## 11.1.0 - 3 October 2024 | ||
@@ -4,0 +7,0 @@ * Re-add `deleteAccessToken` method, but with basic auth removed |
{ | ||
"name": "particle-api-js", | ||
"version": "11.1.0", | ||
"version": "11.1.1", | ||
"description": "Particle API Client", | ||
@@ -5,0 +5,0 @@ "main": "src/Particle.js", |
@@ -29,6 +29,8 @@ /* eslint max-depth: 0 */ | ||
const requestor = isSecure ? https : http; | ||
const nonce = global.performance ? global.performance.now() : 0; | ||
const req = requestor.request({ | ||
hostname, | ||
protocol, | ||
path, | ||
// Firefox has issues making multiple fetch requests with the same parameters so add a nonce | ||
path: `${path}?nonce=${nonce}`, | ||
headers: { | ||
@@ -35,0 +37,0 @@ 'Authorization': `Bearer ${this.token}` |
@@ -52,3 +52,3 @@ const { sinon, expect } = require('./test-setup'); | ||
protocol: 'http:', | ||
path: '/path', | ||
path: '/path?nonce=0', | ||
headers: { | ||
@@ -55,0 +55,0 @@ 'Authorization': 'Bearer token' |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1539349
8553