Skip to content

Commit 157cd2c

Browse files
committed
add builder
1 parent 4afea03 commit 157cd2c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ehttp/src/types.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,11 @@ impl Request {
249249
timeout: Some(Self::DEFAULT_TIMEOUT),
250250
})
251251
}
252+
253+
pub fn with_timeout(mut self, timeout: Option<Duration>) -> Self {
254+
self.timeout = timeout;
255+
self
256+
}
252257
}
253258

254259
/// Response from a completed HTTP request.

0 commit comments

Comments
 (0)