Ejemplo n.º 1
0
    def stream(self):
        if self.is_websocket:
            raise errors.UnsupportedError(
                'ASGI does not support reading the WebSocket handshake request body.'
            )

        if not self._stream:
            self._stream = BoundedStream(self._receive, self.content_length)

        return self._stream
Ejemplo n.º 2
0
 def media(self):
     raise errors.UnsupportedError(
         'The media property is not supported for ASGI requests. '
         'Please use the Request.get_media() coroutine function instead.')