Enable splitting DigestClient into parts

This commit is contained in:
Aode (Lion) 2021-09-21 11:17:01 -05:00
parent be57fcf7dd
commit 9be4a14206
2 changed files with 8 additions and 1 deletions

View file

@ -1,7 +1,7 @@
[package] [package]
name = "http-signature-normalization-actix" name = "http-signature-normalization-actix"
description = "An HTTP Signatures library that leaves the signing to you" description = "An HTTP Signatures library that leaves the signing to you"
version = "0.5.0-beta.8" version = "0.5.0-beta.9"
authors = ["asonix <asonix@asonix.dog>"] authors = ["asonix <asonix@asonix.dog>"]
license-file = "LICENSE" license-file = "LICENSE"
readme = "README.md" readme = "README.md"

View file

@ -120,4 +120,11 @@ where
pub fn send(self) -> SendClientRequest { pub fn send(self) -> SendClientRequest {
self.req.send_body(self.body.as_ref().to_vec()) self.req.send_body(self.body.as_ref().to_vec())
} }
/// Split the parts of the request
///
/// In case the caller needs to interrogate the ClientRequest before sending
pub fn split(self) -> (ClientRequest, V) {
(self.req, self.body)
}
} }