curiouscorrelation e4adfd6e30 fix(desktop): http version deserialization | 2 days ago | |
---|---|---|
.. | ||
dist-js | 2 days ago | |
guest-js | 2 days ago | |
permissions | 1 week ago | |
src | 4 days ago | |
.envrc | 1 week ago | |
.gitignore | 1 week ago | |
Cargo.lock | 4 days ago | |
Cargo.toml | 1 week ago | |
LICENSE.md | 1 week ago | |
README.md | 1 week ago | |
build.rs | 1 week ago | |
devenv.lock | 1 week ago | |
devenv.nix | 1 week ago | |
devenv.yaml | 1 week ago | |
package.json | 1 week ago | |
pnpm-lock.yaml | 1 week ago | |
rollup.config.js | 1 week ago | |
tsconfig.json | 1 week ago |
A HTTP request-response relay plugin for Tauri apps, providing advanced request handling capabilities including custom headers, certificates, proxies, and local system integration.
[!IMPORTANT] This plugin requires Tauri 2.0 or later.
Add the plugin to your project by installing directly from GitHub:
[dependencies]
tauri-plugin-relay = { git = "https://github.com/CuriousCorrelation/tauri-plugin-relay" }
"dependencies": {
"@CuriousCorrelation/plugin-relay": "github:CuriousCorrelation/tauri-plugin-relay"
}
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_relay::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
import { execute, cancel } from '@CuriousCorrelation/plugin-relay'
// Execute a request
const result = await execute({
id: 1,
url: "https://api.example.com/data",
method: "POST",
headers: {
"Content-Type": ["application/json"]
},
content: {
kind: "json",
content: { hello: "world" }
}
})
// Cancel a request
await cancel(1)
The plugin supports multiple content types for requests:
Type | Description |
---|---|
text |
Plain text content |
json |
JSON data with automatic parsing |
form |
Multipart form data with file support |
binary |
Raw binary data with optional MIME type |
urlencoded |
URL-encoded form data |
Built-in support for various authentication methods:
Method | Description |
---|---|
basic |
Basic HTTP authentication |
bearer |
Bearer token authentication |
digest |
Digest authentication (MD5, SHA-256, SHA-512) |
The plugin provides extensive security options:
Requirements:
The plugin provides detailed error information for:
Code: (c) 2024 - CuriousCorrelation
MIT or MIT/Apache 2.0 where applicable.