@@ -18,6 +18,11 @@ mod reqwest;
1818#[ cfg( feature = "reqwest" ) ]
1919pub use self :: reqwest:: ReqwestHttpTransport ;
2020
21+ #[ cfg( all( target_os = "espidf" , feature = "embedded-svc-http" ) ) ]
22+ mod embedded_svc_http;
23+ #[ cfg( all( target_os = "espidf" , feature = "embedded-svc-http" ) ) ]
24+ pub use self :: embedded_svc_http:: EmbeddedSVCHttpTransport ;
25+
2126#[ cfg( feature = "curl" ) ]
2227mod curl;
2328#[ cfg( feature = "curl" ) ]
@@ -38,6 +43,7 @@ type DefaultTransport = ReqwestHttpTransport;
3843
3944#[ cfg( all(
4045 feature = "curl" ,
46+ not( all( target_os = "espidf" , feature = "embedded-svc-http" ) ) ,
4147 not( feature = "reqwest" ) ,
4248 not( feature = "surf" ) ,
4349 not( feature = "ureq" )
@@ -46,6 +52,7 @@ type DefaultTransport = CurlHttpTransport;
4652
4753#[ cfg( all(
4854 feature = "surf" ,
55+ not( all( target_os = "espidf" , feature = "embedded-svc-http" ) ) ,
4956 not( feature = "reqwest" ) ,
5057 not( feature = "curl" ) ,
5158 not( feature = "ureq" )
@@ -54,14 +61,26 @@ type DefaultTransport = SurfHttpTransport;
5461
5562#[ cfg( all(
5663 feature = "ureq" ,
64+ not( all( target_os = "espidf" , feature = "embedded-svc-http" ) ) ,
5765 not( feature = "reqwest" ) ,
5866 not( feature = "curl" ) ,
5967 not( feature = "surf" )
6068) ) ]
6169type DefaultTransport = UreqHttpTransport ;
6270
71+ #[ cfg( all(
72+ target_os = "espidf" ,
73+ feature = "embedded-svc-http" ,
74+ not( feature = "reqwest" ) ,
75+ not( feature = "curl" ) ,
76+ not( feature = "surf" ) ,
77+ not( feature = "ureq" )
78+ ) ) ]
79+ type DefaultTransport = EmbeddedSVCHttpTransport ;
80+
6381/// The default http transport.
6482#[ cfg( any(
83+ all( target_os = "espidf" , feature = "embedded-svc-http" ) ,
6584 feature = "reqwest" ,
6685 feature = "curl" ,
6786 feature = "surf" ,
@@ -80,6 +99,7 @@ pub struct DefaultTransportFactory;
8099impl TransportFactory for DefaultTransportFactory {
81100 fn create_transport ( & self , options : & ClientOptions ) -> Arc < dyn Transport > {
82101 #[ cfg( any(
102+ all( target_os = "espidf" , feature = "embedded-svc-http" ) ,
83103 feature = "reqwest" ,
84104 feature = "curl" ,
85105 feature = "surf" ,
@@ -89,6 +109,7 @@ impl TransportFactory for DefaultTransportFactory {
89109 Arc :: new ( HttpTransport :: new ( options) )
90110 }
91111 #[ cfg( not( any(
112+ all( target_os = "espidf" , feature = "embedded-svc-http" ) ,
92113 feature = "reqwest" ,
93114 feature = "curl" ,
94115 feature = "surf" ,
0 commit comments