mirror of
https://mirror.ghproxy.com/https://github.com/StarCitizenToolBox/app.git
synced 2024-12-23 10:03:43 +08:00
update RSHttp
This commit is contained in:
parent
a0dceb27d9
commit
0b475a50a0
@ -16,7 +16,7 @@ class URLConf {
|
|||||||
static String get gitlabLocalizationUrl =>
|
static String get gitlabLocalizationUrl =>
|
||||||
"$gitApiHome/SCToolBox/LocalizationData";
|
"$gitApiHome/SCToolBox/LocalizationData";
|
||||||
|
|
||||||
static String get apiRepoPath => "$gitApiHome/SCToolBox/api/raw/branch/main/";
|
static String get apiRepoPath => "$gitApiHome/SCToolBox/api/raw/branch/main";
|
||||||
|
|
||||||
static String get gitlabApiPath => "https://$gitApiHome/api/v1/";
|
static String get gitlabApiPath => "https://$gitApiHome/api/v1/";
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ class RSHttp {
|
|||||||
static init() async {
|
static init() async {
|
||||||
await rust_http.setDefaultHeader(headers: {
|
await rust_http.setDefaultHeader(headers: {
|
||||||
"User-Agent":
|
"User-Agent":
|
||||||
"SCToolBox/${AppConf.appVersion} (${AppConf.appVersionCode}) ${AppConf.isMSE ? "" : " DEV"} RSHttp"
|
"SCToolBox/${AppConf.appVersion} (${AppConf.appVersionCode})${AppConf.isMSE ? "" : " DEV"} RSHttp"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,9 @@ lazy_static! {
|
|||||||
.connect_timeout(Duration::from_secs(10))
|
.connect_timeout(Duration::from_secs(10))
|
||||||
.timeout(Duration::from_secs(10))
|
.timeout(Duration::from_secs(10))
|
||||||
.dns_resolver(DNS_CLIENT.clone())
|
.dns_resolver(DNS_CLIENT.clone())
|
||||||
|
.gzip(true)
|
||||||
|
.brotli(true)
|
||||||
|
.deflate(true)
|
||||||
.build()
|
.build()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user