Method to transform handlers' Response result to DTO for publishers.
Source code in faststream/response/response.py
| def as_publish_command(self) -> "PublishCommand":
"""Method to transform handlers' Response result to DTO for publishers."""
return PublishCommand(
body=self.body,
headers=self.headers,
correlation_id=self.correlation_id,
_publish_type=PublishType.PUBLISH,
)
|