Move Agent construction to new AgentBuilder.
In the process, rename set_foo methods to just foo, since methods on the builder will always be setters. Adds a new() method on ConnectionPool so it can be constructed directly with the desired limits. Removes the setter methods on ConnectionPool for those limits. This means that connection limits can only be set when an Agent is built. There were two tests that verify Send and Sync implementations, one for Agent and one for Request. This PR moves the Request test to request.rs, and changes both tests to more directly verify the traits. There may be another way to do this, I'm not sure.
This commit is contained in:
committed by
Martin Algesten
parent
0f083a4436
commit
30162bf3bb
@@ -102,7 +102,7 @@ m0Wqhhi8/24Sy934t5Txgkfoltg8ahkx934WjP6WWRnSAu+cf+vW
|
||||
#[cfg(feature = "tls")]
|
||||
#[test]
|
||||
fn tls_client_certificate() {
|
||||
let agent = ureq::Agent::default().build();
|
||||
let agent = ureq::Agent::default();
|
||||
|
||||
let mut tls_config = rustls::ClientConfig::new();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user