[desktop] Use custom Tauri command for HTTP requests instead of http-client plugin

Replaced the http-client plugin, as it does not support keep-alive connections.
Each request opened a new TCP connection to the service, which was inefficient.

The new custom `send_tauri_http_request` command, exposed to the UI, uses an application-wide `reqwest::Client`, which supports idle (persistent) connections.
This commit is contained in:
Alexandr Stelnykovych
2025-04-24 14:00:15 +03:00
parent a42f0a6084
commit 5053ef1a23
7 changed files with 125 additions and 139 deletions

View File

@@ -33,20 +33,7 @@
"window-state:allow-save-window-state",
"window-state:allow-restore-state",
"clipboard-manager:allow-read-text",
"clipboard-manager:allow-write-text",
{
"identifier": "http:default",
"allow": [
{
"url": "http://127.0.0.1:817/**"
},
{
"url": "http://localhost:817/**"
}
]
},
"websocket:default",
"http:default",
"clipboard-manager:allow-write-text",
"websocket:default"
]
}