Hi ! I'm discovering dioxus in fullstack. Look very interesting !
I'm trying to understand how to implement backend extract .
I'm trying to reproduce the axum-auth example (https://github.com/DioxusLabs/dioxus/tree/v0.5/packages/fullstack/examples/axum-auth).
I reproduced the axum-hello-world example here (so, without axum extract) : https://github.com/buxx/demo/blob/dioxus-test/src/main.rs. And I apply few changes inspired by axum-auth example:
diff --git a/Cargo.toml b/Cargo.toml
index de55bcd..f7671af 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,12 +7,14 @@ edition = "2021"
[dependencies]
dioxus = { version = "0.5.6", features = ["fullstack"] }
+dioxus-fullstack = { version = "0.5.6", features = ["server"] }
serde = "1.0.159"
simple_logger = "4.2.0"
tracing-wasm = "0.2.1"
tracing = "0.1.40"
tracing-subscriber = "0.3.17"
reqwest = "0.11.18"
+axum = "0.7.5"
[features]
default = []
diff --git a/src/main.rs b/src/main.rs
index 08a38cc..efc6541 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -41,6 +42,7 @@ async fn post_server_data(data: String) -> Result<(), ServerFnError> {
#[server]
async fn get_server_data() -> Result<String, ServerFnError> {
+ let method: axum::http::Method = extract().await?;
Ok("Hello world".to_string())
}
But, I got compilation error.