@tauri-apps/plugin-http 2.0.0-beta.0 → 2.0.0-beta.1
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/README.md +1 -1
- package/dist-js/index.cjs +5 -1
- package/dist-js/index.js +5 -1
- package/package.json +2 -2
package/README.md
CHANGED
package/dist-js/index.cjs
CHANGED
|
@@ -76,7 +76,11 @@ async function fetch(input, init) {
|
|
|
76
76
|
const body = await core.invoke("plugin:http|fetch_read_body", {
|
|
77
77
|
rid: responseRid,
|
|
78
78
|
});
|
|
79
|
-
const res = new Response(
|
|
79
|
+
const res = new Response(body instanceof ArrayBuffer && body.byteLength
|
|
80
|
+
? body
|
|
81
|
+
: body instanceof Array && body.length
|
|
82
|
+
? new Uint8Array(body)
|
|
83
|
+
: null, {
|
|
80
84
|
headers,
|
|
81
85
|
status,
|
|
82
86
|
statusText,
|
package/dist-js/index.js
CHANGED
|
@@ -74,7 +74,11 @@ async function fetch(input, init) {
|
|
|
74
74
|
const body = await invoke("plugin:http|fetch_read_body", {
|
|
75
75
|
rid: responseRid,
|
|
76
76
|
});
|
|
77
|
-
const res = new Response(
|
|
77
|
+
const res = new Response(body instanceof ArrayBuffer && body.byteLength
|
|
78
|
+
? body
|
|
79
|
+
: body instanceof Array && body.length
|
|
80
|
+
? new Uint8Array(body)
|
|
81
|
+
: null, {
|
|
78
82
|
headers,
|
|
79
83
|
status,
|
|
80
84
|
statusText,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tauri-apps/plugin-http",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.1",
|
|
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-beta.
|
|
23
|
+
"@tauri-apps/api": "2.0.0-beta.2"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "rollup -c"
|