Closed apatozi closed 2 months ago
Hi,
Thanks for your feedback.
We added additional methods for CapHeader
to allow controlling the response header, see the docs
https://cap.dotnetcore.xyz/user-guide/en/cap/messaging/#controlling-callback-response
Fixed in version 8.2.0-preview-234883029
I found a use case that cannot be fulfilled by current options. When using request/response model by supplying the callback name, you cannot add or edit headers to your response. I tried using OnSubscribeExecuted filter to try set the headers for the case where response was not null but there was no documented way to do this. For the moment we did a workaround to set the cap-callback-name to null in that filter to not let cap respond automatically and at the subscriber we published the response with the topic read from the cap-callback-name header, but it feels hacky. It would be useful to add this functionality natively in the library.