We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2ca8e0 commit f368f8dCopy full SHA for f368f8d
src/mcp/client/sse.py
@@ -24,6 +24,7 @@ async def sse_client(
24
headers: dict[str, Any] | None = None,
25
timeout: float = 5,
26
sse_read_timeout: float = 60 * 5,
27
+ transport: httpx.AsyncHTTPTransport | None = None,
28
):
29
"""
30
Client transport for SSE.
@@ -43,7 +44,10 @@ async def sse_client(
43
44
async with anyio.create_task_group() as tg:
45
try:
46
logger.info(f"Connecting to SSE endpoint: {remove_request_params(url)}")
- async with httpx.AsyncClient(headers=headers) as client:
47
+ async with httpx.AsyncClient(
48
+ headers=headers,
49
+ transport=transport,
50
+ ) as client:
51
async with aconnect_sse(
52
client,
53
"GET",
0 commit comments