44"""
55HTTP client with automatic retry logic and timeout handling.
66
7- This module provides :class:`~PowerPlatform.Dataverse.core.http.HttpClient `, a wrapper
7+ This module provides :class:`~PowerPlatform.Dataverse.core._http._HttpClient `, a wrapper
88around the requests library that adds configurable retry behavior for transient
99network errors and intelligent timeout management based on HTTP method types.
1010"""
1717import requests
1818
1919
20- class HttpClient :
20+ class _HttpClient :
2121 """
2222 HTTP client with configurable retry logic and timeout handling.
2323
2424 Provides automatic retry behavior for transient failures and default timeout
2525 management for different HTTP methods.
2626
2727 :param retries: Maximum number of retry attempts for transient errors. Default is 5.
28- :type retries: `` int`` | `` None``
28+ :type retries: :class:` int` | None
2929 :param backoff: Base delay in seconds between retry attempts. Default is 0.5.
30- :type backoff: `` float`` | `` None``
30+ :type backoff: :class:` float` | None
3131 :param timeout: Default request timeout in seconds. If None, uses per-method defaults.
32- :type timeout: `` float`` | `` None``
32+ :type timeout: :class:` float` | None
3333 """
3434
3535 def __init__ (
@@ -42,20 +42,20 @@ def __init__(
4242 self .base_delay = backoff if backoff is not None else 0.5
4343 self .default_timeout : Optional [float ] = timeout
4444
45- def request (self , method : str , url : str , ** kwargs : Any ) -> requests .Response :
45+ def _request (self , method : str , url : str , ** kwargs : Any ) -> requests .Response :
4646 """
4747 Execute an HTTP request with automatic retry logic and timeout management.
4848
4949 Applies default timeouts based on HTTP method (120s for POST/DELETE, 10s for others)
5050 and retries on network errors with exponential backoff.
5151
5252 :param method: HTTP method (GET, POST, PUT, DELETE, etc.).
53- :type method: `` str` `
53+ :type method: :class:` str`
5454 :param url: Target URL for the request.
55- :type url: `` str` `
55+ :type url: :class:` str`
5656 :param kwargs: Additional arguments passed to ``requests.request()``, including headers, data, etc.
5757 :return: HTTP response object.
58- :rtype: `` requests.Response` `
58+ :rtype: :class:` requests.Response`
5959 :raises requests.exceptions.RequestException: If all retry attempts fail.
6060 """
6161 # If no timeout is provided, use the user-specified default timeout if set;
0 commit comments