INNER CODE UNIT · Python

__call__

florimondmanca/msgpack-asgi · src/msgpack_asgi/_middleware.py:33

    async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None:
        if scope["type"] == "http":
            responder = _MessagePackResponder(
                self._app,
                packb=self._packb,
                unpackb=self._unpackb,
                content_type=self._content_type,
                allow_naive_streaming=self._allow_naive_streaming,
            )
            await responder(scope, receive, send)
            return
        await self._app(scope, receive, send)


class _MessagePackResponder:
    def __init__(
        self,
        app: ASGIApp,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…