@cratis/arc 20.1.1 → 20.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Globals.ts +7 -0
- package/dist/cjs/Globals.d.ts +2 -0
- package/dist/cjs/Globals.d.ts.map +1 -1
- package/dist/cjs/Globals.js +1 -0
- package/dist/cjs/Globals.js.map +1 -1
- package/dist/cjs/queries/ServerSentEventHubConnection.d.ts.map +1 -1
- package/dist/cjs/queries/ServerSentEventHubConnection.js +4 -2
- package/dist/cjs/queries/ServerSentEventHubConnection.js.map +1 -1
- package/dist/esm/Globals.d.ts +2 -0
- package/dist/esm/Globals.d.ts.map +1 -1
- package/dist/esm/Globals.js +1 -0
- package/dist/esm/Globals.js.map +1 -1
- package/dist/esm/queries/ServerSentEventHubConnection.d.ts.map +1 -1
- package/dist/esm/queries/ServerSentEventHubConnection.js +4 -2
- package/dist/esm/queries/ServerSentEventHubConnection.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/queries/ServerSentEventHubConnection.ts +6 -2
package/package.json
CHANGED
|
@@ -281,9 +281,11 @@ export class ServerSentEventHubConnection implements IObservableQueryHubConnecti
|
|
|
281
281
|
request,
|
|
282
282
|
};
|
|
283
283
|
|
|
284
|
+
const customHeaders = Globals.httpHeadersCallback?.() ?? {};
|
|
285
|
+
|
|
284
286
|
fetch(this._subscribeUrl, {
|
|
285
287
|
method: 'POST',
|
|
286
|
-
headers: { 'Content-Type': 'application/json' },
|
|
288
|
+
headers: { 'Content-Type': 'application/json', ...customHeaders },
|
|
287
289
|
body: JSON.stringify(body),
|
|
288
290
|
}).catch(error => {
|
|
289
291
|
console.error(`SSE hub: subscribe POST failed for '${queryId}'`, error);
|
|
@@ -298,9 +300,11 @@ export class ServerSentEventHubConnection implements IObservableQueryHubConnecti
|
|
|
298
300
|
queryId,
|
|
299
301
|
};
|
|
300
302
|
|
|
303
|
+
const customHeaders = Globals.httpHeadersCallback?.() ?? {};
|
|
304
|
+
|
|
301
305
|
fetch(this._unsubscribeUrl, {
|
|
302
306
|
method: 'POST',
|
|
303
|
-
headers: { 'Content-Type': 'application/json' },
|
|
307
|
+
headers: { 'Content-Type': 'application/json', ...customHeaders },
|
|
304
308
|
body: JSON.stringify(body),
|
|
305
309
|
}).catch(error => {
|
|
306
310
|
console.error(`SSE hub: unsubscribe POST failed for '${queryId}'`, error);
|