docs: correct create_mcp_http_client default timeout docstring (#2683)
Co-authored-by: aryanmotgi <carecompanioninc@gmail.com> Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
This commit is contained in:
parent
c91f406938
commit
60c0420775
1 changed files with 3 additions and 5 deletions
|
|
@ -27,14 +27,12 @@ def create_mcp_http_client(
|
||||||
) -> httpx.AsyncClient:
|
) -> httpx.AsyncClient:
|
||||||
"""Create a standardized httpx AsyncClient with MCP defaults.
|
"""Create a standardized httpx AsyncClient with MCP defaults.
|
||||||
|
|
||||||
This function provides common defaults used throughout the MCP codebase:
|
Always enables follow_redirects and applies an SSE-friendly default timeout.
|
||||||
- follow_redirects=True (always enabled)
|
|
||||||
- Default timeout of 30 seconds if not specified
|
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
headers: Optional headers to include with all requests.
|
headers: Optional headers to include with all requests.
|
||||||
timeout: Request timeout as httpx.Timeout object.
|
timeout: Request timeout as httpx.Timeout object. Defaults to 30s for
|
||||||
Defaults to 30 seconds if not specified.
|
connect/write/pool and 300s for read (for long-lived SSE streams).
|
||||||
auth: Optional authentication handler.
|
auth: Optional authentication handler.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue