mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-09-05 15:39:07 +08:00
后端 format
This commit is contained in:
@@ -2,6 +2,7 @@ mod info;
|
|||||||
mod message;
|
mod message;
|
||||||
|
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use futures::future;
|
use futures::future;
|
||||||
pub use info::DownloadNotifyInfo;
|
pub use info::DownloadNotifyInfo;
|
||||||
@@ -91,18 +92,15 @@ impl Notifier {
|
|||||||
|
|
||||||
if let Some(custom_headers) = headers {
|
if let Some(custom_headers) = headers {
|
||||||
for (key, value) in custom_headers {
|
for (key, value) in custom_headers {
|
||||||
if let (Ok(key), Ok(value)) = (header::HeaderName::try_from(key), header::HeaderValue::try_from(value)) {
|
if let (Ok(key), Ok(value)) =
|
||||||
|
(header::HeaderName::try_from(key), header::HeaderValue::try_from(value))
|
||||||
|
{
|
||||||
headers_map.insert(key, value);
|
headers_map.insert(key, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
client
|
client.post(url).headers(headers_map).body(payload).send().await?;
|
||||||
.post(url)
|
|
||||||
.headers(headers_map)
|
|
||||||
.body(payload)
|
|
||||||
.send()
|
|
||||||
.await?;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Reference in New Issue
Block a user