@zimbra/api-client 100.0.0 → 100.1.0

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-lock.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zimbra/api-client",
3
- "version": "100.0.0",
3
+ "version": "100.1.0",
4
4
  "lockfileVersion": 1,
5
5
  "requires": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zimbra/api-client",
3
3
  "amdName": "zmApiJsClient",
4
- "version": "100.0.0",
4
+ "version": "100.1.0",
5
5
  "description": "Zimbra JS API Client and GraphQL client for making requests against the Zimbra SOAP API.",
6
6
  "main": "dist/zm-api-js-client.js",
7
7
  "source": "index.ts",
@@ -951,11 +951,15 @@ export class ZimbraBatchClient {
951
951
  };
952
952
 
953
953
  try {
954
- const blob = new Blob([JSON.stringify(body)]);
955
- if (navigator) {
956
- // In zimbra desktop client navigator is null
957
- navigator.sendBeacon(`${this.origin}/service/soap`, blob);
958
- }
954
+ fetch(`${this.origin}/service/soap`, {
955
+ method: 'POST',
956
+ keepalive: true,
957
+ headers: {
958
+ 'Content-Type': 'application/json',
959
+ 'X-Zimbra-Csrf-Token': this.csrfToken || ''
960
+ },
961
+ body: JSON.stringify(body)
962
+ });
959
963
  } catch (e) {
960
964
  throw new Error('Error on endSessionBeaconRequest request' + e);
961
965
  }