Add streamable_http_client which accepts httpx.AsyncClient instead of httpx_client_factory (#1177)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
parent
cc8382ce3e
commit
a3a4b8d11a
1 changed files with 488 additions and 221 deletions
|
|
@ -18,7 +18,7 @@ from starlette.responses import JSONResponse, Response
|
|||
from starlette.routing import Route
|
||||
|
||||
from mcp import ClientSession, types
|
||||
from mcp.client.streamable_http import streamablehttp_client
|
||||
from mcp.client.streamable_http import streamable_http_client
|
||||
from mcp.shared.session import RequestResponder
|
||||
from mcp.types import ClientNotification, RootsListChangedNotification
|
||||
from tests.test_helpers import wait_for_server
|
||||
|
|
@ -127,7 +127,7 @@ async def test_non_compliant_notification_response(non_sdk_server: None, non_sdk
|
|||
if isinstance(message, Exception):
|
||||
returned_exception = message
|
||||
|
||||
async with streamablehttp_client(server_url) as (read_stream, write_stream, _):
|
||||
async with streamable_http_client(server_url) as (read_stream, write_stream, _):
|
||||
async with ClientSession(
|
||||
read_stream,
|
||||
write_stream,
|
||||
|
|
|
|||
Loading…
Reference in a new issue