refactor: return optional request body from build_request_v2 in ConnectorIntegrationV2 trait (#5865)

This commit is contained in:
Hrithikesh
2024-09-12 19:18:01 +05:30
committed by GitHub
parent 00386f3295
commit 608676c8e2
2 changed files with 27 additions and 12 deletions

View File

@ -152,6 +152,11 @@ impl RequestBuilder {
self
}
pub fn set_optional_body<T: Into<RequestContent>>(mut self, body: Option<T>) -> Self {
body.map(|body| self.body.replace(body.into()));
self
}
pub fn set_body<T: Into<RequestContent>>(mut self, body: T) -> Self {
self.body.replace(body.into());
self