Skip to content

Commit

Permalink
Add max_concurrent_requests setter for HttpClientBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
sydhds committed Oct 8, 2024
1 parent b3d548e commit 4a688eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/http-client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@ pub struct HttpClientBuilder<L = Identity> {
}

impl<L> HttpClientBuilder<L> {

/// Set the maximum number of concurrent requests. Default is 256.
pub fn max_concurrent_requests(mut self, max_concurrent_requests: usize) -> Self {
self.max_concurrent_requests = max_concurrent_requests;
self
}

/// Set the maximum size of a request body in bytes. Default is 10 MiB.
pub fn max_request_size(mut self, size: u32) -> Self {
self.max_request_size = size;
Expand Down

0 comments on commit 4a688eb

Please sign in to comment.