@vacantthinker/firefox-addon-framework-easy 2026.526.1648 → 2026.526.1702
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 +1 -1
- package/src/serviceFetch.js +15 -10
package/package.json
CHANGED
package/src/serviceFetch.js
CHANGED
|
@@ -61,15 +61,20 @@ export async function serviceSendDataToLocalAria2(message) {
|
|
|
61
61
|
params,
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
try {
|
|
65
|
+
const response = await fetch(`http://localhost:${port}/jsonrpc`, {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
headers: {
|
|
68
|
+
Accept: 'application/json',
|
|
69
|
+
'Content-Type': 'application/json;charset=UTF-8',
|
|
70
|
+
},
|
|
71
|
+
body: JSON.stringify(data),
|
|
72
|
+
});
|
|
73
|
+
console.info(`response=\n`, response);
|
|
74
|
+
|
|
75
|
+
return response;
|
|
76
|
+
} catch (e) {
|
|
77
|
+
console.error(e);
|
|
78
|
+
}
|
|
73
79
|
|
|
74
|
-
return response;
|
|
75
80
|
}
|