def METHOD_NAME(self, request: Request) -> Response:
    serializer = self.get_serializer(data=request.data)
    serializer.is_valid(raise_exception=True)
    language_code = serializer.data["code"]
    activate(language_code)
    response = Response(status=status.HTTP_204_NO_CONTENT)
    set_language_cookie(response, language_code)
    return response