Skip to content

[http] Command fetch not found #587

@Bricklou

Description

@Bricklou

I tried to install the HTTP plugin like explained in the README, and i got the error Command fetch not found when calling the method from JS.

I have the following code:

fn main() {
    tauri::Builder::default()
       // ...
        // HTTP plugin
        .plugin(tauri_plugin_http::init())
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
import { fetch } from "@tauri-apps/plugin-http";

// Check if the url is reachable
const response = await fetch(value, {
    method: "GET",
    connectTimeout: 1000,
});

Is this normal ? Or did I miss something while configuring the plugin ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions