@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/arc",
3
- "version": "20.1.1",
3
+ "version": "20.1.3",
4
4
  "description": "",
5
5
  "author": "Cratis",
6
6
  "license": "MIT",
@@ -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);