MCPcopy
hub / github.com/nonebot/nonebot2 / stream_request

Method stream_request

nonebot/drivers/httpx.py:224–234  ·  view source on GitHub ↗
(
        self,
        setup: Request,
        *,
        chunk_size: int = 1024,
    )

Source from the content-addressed store, hash-verified

222
223 @override
224 async def stream_request(
225 self,
226 setup: Request,
227 *,
228 chunk_size: int = 1024,
229 ) -> AsyncGenerator[Response, None]:
230 async with self.get_session(
231 version=setup.version, proxy=setup.proxy
232 ) as session:
233 async for response in session.stream_request(setup, chunk_size=chunk_size):
234 yield response
235
236 @override
237 def get_session(

Callers 4

test_http_clientFunction · 0.45
test_http_client_sessionFunction · 0.45
test_http_client_timeoutFunction · 0.45

Calls 1

get_sessionMethod · 0.95

Tested by 4

test_http_clientFunction · 0.36
test_http_client_sessionFunction · 0.36
test_http_client_timeoutFunction · 0.36