Skip to content

ensure_response

faststream.broker.response.ensure_response #

ensure_response(response)
Source code in faststream/broker/response.py
def ensure_response(response: Union["Response", "Any"]) -> "Response":
    if isinstance(response, Response):
        return response

    return Response(response)