Response faststream.broker.response.Response # Response(body, *, headers=None, correlation_id=None) Initialize a handler. Source code in faststream/broker/response.py 8 9 10 11 12 13 14 15 16 17 18def __init__( self, body: "Any", *, headers: Optional["AnyDict"] = None, correlation_id: Optional[str] = None, ) -> None: """Initialize a handler.""" self.body = body self.headers = headers or {} self.correlation_id = correlation_id body instance-attribute # body = body headers instance-attribute # headers = headers or {} correlation_id instance-attribute # correlation_id = correlation_id add_headers # add_headers(extra_headers, *, override=True) Source code in faststream/broker/response.py 20 21 22 23 24 25 26 27 28 29def add_headers( self, extra_headers: "AnyDict", *, override: bool = True, ) -> None: if override: self.headers = {**self.headers, **extra_headers} else: self.headers = {**extra_headers, **self.headers} as_publish_kwargs # as_publish_kwargs() Source code in faststream/broker/response.py 31 32 33 34 35 36def as_publish_kwargs(self) -> "AnyDict": publish_options = { "headers": self.headers, "correlation_id": self.correlation_id, } return publish_options