diff --git a/src/core.rs b/src/core.rs index 801c024..ea3fb9f 100644 --- a/src/core.rs +++ b/src/core.rs @@ -77,7 +77,9 @@ pub async fn play_sound(url: String) -> Result<(), gloo_net::Error> { .method(Method::GET) .mode(RequestMode::Cors) .cache(RequestCache::NoCache) - .body(Json(PlaySoundPayload { name: url.clone() }))?; + .body(serde_json::to_string(&PlaySoundPayload { + name: url.clone(), + })?)?; let resp = req.send().await?;