+
    ûwÖiZ  ã                   óX   € R t ^ RIHtHt ^ RIt. R	OtRtRt ! R R]4      tR
R R llt	R# )z@Utilities for creating standardized httpx AsyncClient instances.)ÚAnyÚProtocolNg      >@g     Àr@c                   ó6   a € ] tR t^t o RV 3R lR lltRtV tR# )ÚMcpHttpClientFactoryNc                ó®   <€ V ^8„  d   QhRS[ S[S[3,          R,          RS[P                  R,          RS[P                  R,          RS[P
                  /# ©é   ÚheadersNÚtimeoutÚauthÚreturn©ÚdictÚstrÚhttpxÚTimeoutÚAuthÚAsyncClient)ÚformatÚ__classdict__s   "€ÚK/home/ubuntu/.local/lib/python3.14/site-packages/mcp/shared/_httpx_utils.pyÚ__annotate__Ú!McpHttpClientFactory.__annotate__   sX   ø€ ÷  ñ  á‘c™3h• $Õ&ð ñ —‘ Õ%ð ñ j‰j˜4Õð	 ñ
 
×	Ñ	ñ ó    c                ó   € R # )N© )Úselfr	   r
   r   s   &&&&r   Ú__call__ÚMcpHttpClientFactory.__call__   s   € ñ
  r   r   ©NNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s   ø‡ € ÷ ÷  ð  r   r   c                óÐ   € V ^8„  d   QhR\         \        \        3,          R,          R\        P                  R,          R\        P                  R,          R\        P
                  /# r   r   )r   s   "r   r   r      s[   € ÷ @'ñ @'Ü”#”s(^˜dÕ"ð@'ä]‰]˜TÕ!ð@'ô *‰*tÕ
ð@'ô ×Ññ	@'r   c                ó®   € RR/pVf%   \         P                  ! \        \        R7      VR&   MWR&   V e   WR&   Ve   W#R&   \         P                  ! R/ VB # )a  Create a standardized httpx AsyncClient with MCP defaults.

This function provides common defaults used throughout the MCP codebase:
- follow_redirects=True (always enabled)
- Default timeout of 30 seconds if not specified

Args:
    headers: Optional headers to include with all requests.
    timeout: Request timeout as httpx.Timeout object.
        Defaults to 30 seconds if not specified.
    auth: Optional authentication handler.

Returns:
    Configured httpx.AsyncClient instance with MCP defaults.

Note:
    The returned AsyncClient must be used as a context manager to ensure
    proper cleanup of connections.

Examples:
    # Basic usage with MCP defaults
    async with create_mcp_http_client() as client:
        response = await client.get("https://api.example.com")

    # With custom headers
    headers = {"Authorization": "Bearer token"}
    async with create_mcp_http_client(headers) as client:
        response = await client.get("/endpoint")

    # With both custom headers and timeout
    timeout = httpx.Timeout(60.0, read=300.0)
    async with create_mcp_http_client(headers, timeout) as client:
        response = await client.get("/long-request")

    # With authentication
    from httpx import BasicAuth
    auth = BasicAuth(username="user", password="pass")
    async with create_mcp_http_client(headers, timeout, auth) as client:
        response = await client.get("/protected-endpoint")
Úfollow_redirectsT)Úreadr
   r	   r   r   )r   r   ÚMCP_DEFAULT_TIMEOUTÚMCP_DEFAULT_SSE_READ_TIMEOUTr   )r	   r
   r   Úkwargss   &&& r   Úcreate_mcp_http_clientr-      sj   € ð^ 	˜Dð€Fð
 ‚Ü!ŸMšMÔ*=ÔD`ÔaˆˆyÒà#ˆyÑð ÒØ#ˆyÑð ÒØˆv‰ä×ÒÑ&˜vÑ&Ð&r   )r-   r*   r+   r   )
Ú__doc__Útypingr   r   r   Ú__all__r*   r+   r   r-   r   r   r   Ú<module>r1      s9   ðÙ Fç  ã â
[€ð Ð Ø$Ð ô ˜8ô  ÷@'ñ @'r   