You've already forked AstralRinth
forked from didirus/AstralRinth
Mod Management API (#81)
* Profile mod management * remove print statement
This commit is contained in:
@@ -1,29 +1,13 @@
|
||||
//! Configuration structs
|
||||
|
||||
use once_cell::sync::Lazy;
|
||||
use std::time;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
pub static BINCODE_CONFIG: Lazy<bincode::config::Configuration> =
|
||||
Lazy::new(|| {
|
||||
lazy_static! {
|
||||
pub static ref BINCODE_CONFIG: bincode::config::Configuration =
|
||||
bincode::config::standard()
|
||||
.with_little_endian()
|
||||
.with_no_limit()
|
||||
});
|
||||
|
||||
pub static REQWEST_CLIENT: Lazy<reqwest::Client> = Lazy::new(|| {
|
||||
let mut headers = reqwest::header::HeaderMap::new();
|
||||
let header = reqwest::header::HeaderValue::from_str(&format!(
|
||||
"modrinth/daedalus/{} (support@modrinth.com)",
|
||||
env!("CARGO_PKG_VERSION")
|
||||
))
|
||||
.unwrap();
|
||||
headers.insert(reqwest::header::USER_AGENT, header);
|
||||
reqwest::Client::builder()
|
||||
.tcp_keepalive(Some(time::Duration::from_secs(10)))
|
||||
.default_headers(headers)
|
||||
.build()
|
||||
.expect("Reqwest Client Building Failed")
|
||||
});
|
||||
.with_no_limit();
|
||||
}
|
||||
|
||||
pub const MODRINTH_API_URL: &str = "https://api.modrinth.com/v2/";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user