robespierre_http/core.rs
1use robespierre_models::core::RevoltConfiguration;
2
3use crate::{Http, Result};
4
5impl Http {
6 pub(crate) async fn get_revolt_config(
7 client: &reqwest::Client,
8 root_url: &str,
9 ) -> Result<RevoltConfiguration> {
10 Ok(client
11 .get(root_url)
12 .send()
13 .await?
14 .error_for_status()?
15 .json()
16 .await?)
17 }
18}