HTTP Client
Esta página aún no está disponible en tu idioma.
Make HTTP requests with the http plugin.
Setup
Install the http plugin to get started.
Use your project’s package manager to add the dependency:
-
Run
cargo add tauri-plugin-http
to add the plugin to the project’s dependencies inCargo.toml
. -
Modify
lib.rs
to initialize the plugin: -
If you’d like to make http requests in JavaScript then install the npm package as well:
Usage
The http plugin is available in both as an JavaScript API and in Rust as a reqwest re-export.
JavaScript
-
Configure the allowed URLs
For more information, please see the documentation for Access Control Lists
-
Send a request
Rust
In Rust you can utilize the reqwest
crate re-exported by the plugin. For more details refer to reqwest docs.
© 2024 Tauri Contributors. CC-BY / MIT