You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As per title. Everything works fine until using a method provided only in the cookies feature. The project builds fine using cargo build
Error: 🚫 Serving project failed: error[E0599]: no method named `cookie_store` found for struct `ClientBuilder` in the current scope
--> src\main.rs:21:42
|
21 | let cli = reqwest::Client::builder().cookie_store(true).build().unwrap();
| ^^^^^^^^^^^^ method not found in `ClientBuilder`
My main.rs:
#![allow(non_snake_case)]
// import the prelude to get access to the `rsx!` macro and the `Scope` and `Element` types
use dioxus::prelude::*;
fn main() {
// launch the web app
dioxus_web::launch(App);
}
// create a component that renders a div with the text "Hello, world!"
fn App(cx: Scope) -> Element {
cx.render(rsx! {
div {
"Hello, world!"
}
})
}
async fn brokey(){
let endpoint = format!("http://dinguswingus.com/dingus");
let cli = reqwest::Client::builder().cookie_store(true).build().unwrap();
cli.post(endpoint).send().await;
}
Steps To Reproduce
Steps to reproduce the behavior:
Create a new demo project as usual, then add reqwests with cookies
cargo new --bin demo
cargo add dioxus
cargo add dioxus-web
cargo add reqwest --features cookies
Add some code that uses the cookies feature, like below:
async fn brokey(){
let endpoint = format!("http://dinguswingus.com/dingus");
let cli = reqwest::Client::builder().cookie_store(true).build().unwrap();
cli.post(endpoint).send().await;
}
Expected behavior
The build doesn't fail :(
Environment:
Dioxus version: 0.4.3
dioxus-cli version: Tried 0.4.3, and 0.5.0-alpha.2
Rust version: 1.74.0
OS info: Windows
App platform: web
Questionnaire
I'm interested in fixing this myself but don't know where to start
I would like to fix and I have a solution
I don't have time to fix this right now, but maybe later
The text was updated successfully, but these errors were encountered:
cargo build will build an application that targets your current platform. cargo build --target wasm32-unknown-unknown will build an application that targets WASM (like dioxus web). reqwest. It looks like reqwest doesn't support cookies in wasm: seanmonstar/reqwest#1449
Problem
As per title. Everything works fine until using a method provided only in the cookies feature. The project builds fine using
cargo build
My main.rs:
Steps To Reproduce
Steps to reproduce the behavior:
Create a new demo project as usual, then add reqwests with cookies
Expected behavior
The build doesn't fail :(
Environment:
Questionnaire
The text was updated successfully, but these errors were encountered: