• 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 //! Ylong http client utility 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 pub(crate) mod base64;
23 pub(crate) mod config;
24 pub(crate) mod normalizer;
25 pub(crate) mod pool;
26 pub(crate) mod proxy;
27 pub(crate) mod redirect;
28 
29 #[cfg(feature = "async")]
30 pub(crate) mod request;
31 
32 #[cfg(feature = "__tls")]
33 pub(crate) mod c_openssl;
34 
35 #[cfg(any(feature = "http1_1", feature = "http2"))]
36 pub(crate) mod dispatcher;
37 
38 #[cfg(feature = "http3")]
39 pub(crate) mod alt_svc;
40 #[cfg(any(feature = "http3", feature = "http2"))]
41 pub(crate) mod data_ref;
42 #[cfg(feature = "http2")]
43 pub(crate) mod h2;
44 #[cfg(feature = "http3")]
45 pub(crate) mod h3;
46 pub(crate) mod information;
47 pub(crate) mod interceptor;
48 pub(crate) mod monitor;
49 #[cfg(all(test, feature = "ylong_base"))]
50 pub(crate) mod test_utils;
51 
52 #[cfg(feature = "__tls")]
53 pub use c_openssl::{
54     Cert, Certificate, PubKeyPins, PubKeyPinsBuilder, TlsConfig, TlsConfigBuilder, TlsFileType,
55     TlsVersion,
56 };
57 #[cfg(feature = "__tls")]
58 pub(crate) use config::{AlpnProtocol, AlpnProtocolList};
59 #[cfg(feature = "__tls")]
60 pub use config::{CertVerifier, ServerCerts};
61 pub use config::{Proxy, ProxyBuilder, Redirect, Retry, SpeedLimit, Timeout};
62 #[cfg(all(feature = "async", feature = "ylong_base", feature = "http2"))]
63 pub(crate) use h2::{split, Reader, Writer};
64 pub use information::{ConnData, ConnDataBuilder, ConnDetail, ConnInfo, NegotiateInfo};
65 pub use interceptor::{ConnProtocol, Interceptor};
66 pub use monitor::TimeGroup;
67