@tauri-apps/plugin-http 2.0.0-alpha.4 → 2.0.0-alpha.5

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/dist-js/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var primitives = require('@tauri-apps/api/primitives');
3
+ var core = require('@tauri-apps/api/core');
4
4
 
5
5
  // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
6
6
  // SPDX-License-Identifier: Apache-2.0
@@ -51,7 +51,7 @@ async function fetch(input, init) {
51
51
  const req = new Request(input, init);
52
52
  const buffer = await req.arrayBuffer();
53
53
  const reqData = buffer.byteLength ? Array.from(new Uint8Array(buffer)) : null;
54
- const rid = await primitives.invoke("plugin:http|fetch", {
54
+ const rid = await core.invoke("plugin:http|fetch", {
55
55
  method: req.method,
56
56
  url: req.url,
57
57
  headers: Array.from(req.headers.entries()),
@@ -60,14 +60,14 @@ async function fetch(input, init) {
60
60
  connectTimeout,
61
61
  });
62
62
  req.signal.addEventListener("abort", () => {
63
- primitives.invoke("plugin:http|fetch_cancel", {
63
+ core.invoke("plugin:http|fetch_cancel", {
64
64
  rid,
65
65
  });
66
66
  });
67
- const { status, statusText, url, headers } = await primitives.invoke("plugin:http|fetch_send", {
67
+ const { status, statusText, url, headers } = await core.invoke("plugin:http|fetch_send", {
68
68
  rid,
69
69
  });
70
- const body = await primitives.invoke("plugin:http|fetch_read_body", {
70
+ const body = await core.invoke("plugin:http|fetch_read_body", {
71
71
  rid,
72
72
  });
73
73
  const res = new Response(new Uint8Array(body), {
package/dist-js/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { invoke } from '@tauri-apps/api/primitives';
1
+ import { invoke } from '@tauri-apps/api/core';
2
2
 
3
3
  // Copyright 2019-2023 Tauri Programme within The Commons Conservancy
4
4
  // SPDX-License-Identifier: Apache-2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tauri-apps/plugin-http",
3
- "version": "2.0.0-alpha.4",
3
+ "version": "2.0.0-alpha.5",
4
4
  "license": "MIT or APACHE-2.0",
5
5
  "authors": [
6
6
  "Tauri Programme within The Commons Conservancy"
@@ -20,7 +20,7 @@
20
20
  "LICENSE"
21
21
  ],
22
22
  "dependencies": {
23
- "@tauri-apps/api": "2.0.0-alpha.12"
23
+ "@tauri-apps/api": "2.0.0-alpha.13"
24
24
  },
25
25
  "scripts": {
26
26
  "build": "rollup -c"