11
This commit is contained in:
@@ -65,13 +65,18 @@ pub async fn request_json(
|
||||
|
||||
let res = req.send().await.map_err(|e| {
|
||||
if e.is_connect() {
|
||||
println!("无法连接服务器,请确认后端已启动");
|
||||
"无法连接服务器,请确认后端已启动".to_string()
|
||||
|
||||
} else {
|
||||
println!("e: {}", e);
|
||||
e.to_string()
|
||||
|
||||
}
|
||||
})?;
|
||||
|
||||
let status = res.status().as_u16();
|
||||
println!("status: {}", status);
|
||||
let encrypted = res
|
||||
.headers()
|
||||
.get(ENCRYPTED_HEADER)
|
||||
|
||||
Reference in New Issue
Block a user