@@ -86,6 +86,29 @@ def __init__(
86
86
auth_basic : Optional [Tuple [str , str ]] = None , # (username, password)
87
87
user_agent : str = DEFAULT_USER_AGENT ,
88
88
) -> None :
89
+ """
90
+ Initialize a new HTTP client instance.
91
+
92
+ Args:
93
+ base_url: Base URL for all requests. Will be prefixed to all paths.
94
+ headers: Default headers to include in all requests.
95
+ timeout: Default timeout in seconds for requests.
96
+ retry: Retry configuration for failed requests.
97
+ verify_tls: Whether to verify TLS certificates.
98
+ ca_file: Path to CA certificate file for TLS verification.
99
+ ca_path: Path to a directory containing CA certificates.
100
+ ca_data: CA certificate data as string or bytes.
101
+ client_cert_file: Path to client certificate for mutual TLS.
102
+ client_key_file: Path to a client private key for mutual TLS.
103
+ client_key_password: Password for an encrypted client private key.
104
+ auth_basic: Tuple of (username, password) for HTTP basic auth.
105
+ user_agent: User-Agent header value for requests.
106
+
107
+ The client supports both regular HTTPS with server verification and mutual TLS
108
+ authentication. For server verification, provide CA certificate information via
109
+ ca_file, ca_path or ca_data. For mutual TLS, additionally provide a client
110
+ certificate and key via client_cert_file and client_key_file.
111
+ """
89
112
self .base_url = base_url .rstrip ("/" ) + "/" if base_url and not base_url .endswith ("/" ) else base_url
90
113
self ._default_headers = {k .lower (): v for k , v in (headers or {}).items ()}
91
114
self .timeout = timeout
0 commit comments