1
0
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:
fakeshadow
2021-03-07 15:57:32 -08:00
committed by GitHub
parent 2d3a0d6038
commit 5b4105e1e6
4 changed files with 41 additions and 11 deletions

View File

@@ -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()
}
}