• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2023 Huawei Device Co., Ltd.
2 // Licensed under the Apache License, Version 2.0 (the "License");
3 // you may not use this file except in compliance with the License.
4 // You may obtain a copy of the License at
5 //
6 //     http://www.apache.org/licenses/LICENSE-2.0
7 //
8 // Unless required by applicable law or agreed to in writing, software
9 // distributed under the License is distributed on an "AS IS" BASIS,
10 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 // See the License for the specific language governing permissions and
12 // limitations under the License.
13 
14 //! Http client Util module.
15 //!
16 //! A tool module that supports various functions of the http client.
17 //!
18 //! -[`ClientConfig`] is used to configure a client with options and flags.
19 //! -[`HttpConfig`] is used to configure `HTTP` related logic.
20 //! -[`HttpVersion`] is used to provide Http Version.
21 
22 #![allow(dead_code)]
23 #![allow(unused_imports)]
24 
25 mod config;
26 #[cfg(feature = "__tls")]
27 pub use config::{AlpnProtocol, AlpnProtocolList};
28 pub(crate) use config::{ClientConfig, ConnectorConfig, HttpConfig, HttpVersion};
29 pub use config::{Proxy, ProxyBuilder, Redirect, Retry, SpeedLimit, Timeout};
30 
31 #[cfg(feature = "__c_openssl")]
32 pub(crate) mod c_openssl;
33 #[cfg(feature = "__c_openssl")]
34 pub use c_openssl::{Cert, Certificate, TlsConfig, TlsConfigBuilder, TlsFileType, TlsVersion};
35 #[cfg(feature = "http2")]
36 pub use config::H2Config;
37 
38 #[cfg(any(feature = "http1_1", feature = "http2"))]
39 pub(crate) mod dispatcher;
40 
41 pub(crate) mod normalizer;
42 pub(crate) mod pool;
43 
44 pub(crate) mod base64;
45 pub(crate) mod proxy;
46 pub(crate) mod redirect;
47