+3
-3
crates/atproto-client/src/client.rs
+3
-3
crates/atproto-client/src/client.rs
···
693
http_client: &reqwest::Client,
694
app_auth: &AppPasswordAuth,
695
url: &str,
696
-
record: serde_json::Value,
697
additional_headers: &HeaderMap,
698
) -> Result<Bytes> {
699
let mut headers = additional_headers.clone();
···
704
let http_response = http_client
705
.post(url)
706
.headers(headers)
707
-
.json(&record)
708
.send()
709
-
.instrument(tracing::info_span!("get_apppassword_bytes_with_headers", url = %url))
710
.await
711
.map_err(|error| ClientError::HttpRequestFailed {
712
url: url.to_string(),
···
693
http_client: &reqwest::Client,
694
app_auth: &AppPasswordAuth,
695
url: &str,
696
+
payload: Bytes,
697
additional_headers: &HeaderMap,
698
) -> Result<Bytes> {
699
let mut headers = additional_headers.clone();
···
704
let http_response = http_client
705
.post(url)
706
.headers(headers)
707
+
.body(payload)
708
.send()
709
+
.instrument(tracing::info_span!("post_apppassword_bytes_with_headers", url = %url))
710
.await
711
.map_err(|error| ClientError::HttpRequestFailed {
712
url: url.to_string(),