This commit is contained in:
Greg Burri 2025-05-07 20:12:49 +02:00
parent 198bff6e4a
commit 6f014ef238
19 changed files with 118 additions and 81 deletions

View file

@ -15,7 +15,10 @@ pub enum Error {
Gloo(#[from] gloo::net::Error),
#[error("RON Spanned error: {0}")]
Ron(#[from] ron::error::SpannedError),
RonSpanned(#[from] ron::error::SpannedError),
#[error("RON Error: {0}")]
Ron(#[from] ron::error::Error),
#[error("HTTP error: {0}")]
Http(String),
@ -40,7 +43,7 @@ where
{
let url = format!("/ron-api/{}", api_name);
let request_builder = method_fn(&url).header(CONTENT_TYPE, CONTENT_TYPE_RON);
send_req(request_builder.body(ron_api::to_string(body))?).await
send_req(request_builder.body(ron_api::to_string(body)?)?).await
}
async fn req_with_params<T, U>(