From 487fa25dc8ba578574190a973fd68ca3db4d25b9 Mon Sep 17 00:00:00 2001 From: Varun V <56495025+created-by-varun@users.noreply.github.com> Date: Wed, 16 Apr 2025 03:04:20 +0530 Subject: [PATCH] fix: Use as_value() to properly serialize form values in login example (#3835) The login form example was trying to directly use FormValue in reqwest's form method, which doesn't implement Serialize. This change extracts the actual string values using as_value() before sending them to the server. --- examples/login_form.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/login_form.rs b/examples/login_form.rs index 8549ba00e..6c2098e1a 100644 --- a/examples/login_form.rs +++ b/examples/login_form.rs @@ -17,8 +17,8 @@ fn app() -> Element { let resp = reqwest::Client::new() .post("http://localhost:8080/login") .form(&[ - ("username", &evt.values()["username"]), - ("password", &evt.values()["password"]), + ("username", evt.values()["username"].as_value()), + ("password", evt.values()["password"].as_value()), ]) .send() .await;