Keep authentication failures refundable and bound inline peer previews

This commit is contained in:
archipelago
2026-10-06 06:27:06 -04:00
parent 8ffbf5ff6e
commit b8e512fed6
5 changed files with 117 additions and 39 deletions
+9
View File
@@ -502,6 +502,15 @@ impl<'a> PeerRequest<'a> {
Ok(self)
}
/// Return authentication and delivery failures through one result. Payment
/// callers must be able to reclaim an unsent token if proof preparation fails.
pub async fn send_content_get(
self,
data_dir: &std::path::Path,
) -> Result<(reqwest::Response, crate::transport::TransportKind)> {
self.authenticate_content(data_dir).await?.send_get().await
}
pub fn header(mut self, name: &'a str, value: impl Into<String>) -> Self {
self.headers.push((name, value.into()));
self