mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-01 01:16:59 +02:00
Refactor/client builder (#2053)
This commit is contained in:
@@ -107,7 +107,7 @@ use actix_http::{
|
||||
RequestHead,
|
||||
};
|
||||
use actix_rt::net::TcpStream;
|
||||
use actix_service::{boxed, Service};
|
||||
use actix_service::Service;
|
||||
|
||||
mod builder;
|
||||
mod connect;
|
||||
@@ -157,13 +157,7 @@ pub(crate) struct ClientConfig {
|
||||
|
||||
impl Default for Client {
|
||||
fn default() -> Self {
|
||||
Client(Rc::new(ClientConfig {
|
||||
connector: boxed::service(self::connect::DefaultConnector::new(
|
||||
Connector::new().finish(),
|
||||
)),
|
||||
headers: HeaderMap::new(),
|
||||
timeout: Some(Duration::from_secs(5)),
|
||||
}))
|
||||
ClientBuilder::new().finish()
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user