-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NATS transport] Support for headers in EncodeJSONResponse #1238
Comments
EncodeJSONResponse is a default implementation of a function that consumers can also provide themselves. Does anything prevent that, here? |
No, I'm wondering if a default implementation could have the same feature
than the HTTP one.
==============
Massimo Costa
Il mer 29 giu 2022, 18:51 Peter Bourgon ***@***.***> ha
scritto:
… EncodeJSONResponse is a default implementation of a function that
consumers can also provide themselves. Does anything prevent that, here?
—
Reply to this email directly, view it on GitHub
<#1238 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4I7OL4KRL6VJYRFXQYT23VRR5JRANCNFSM52EO2ZYA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
So I'd like to try to avoid the situation where default implementations provided by Go kit, like this function, being continuously updated with new features/capabilities of their underlying systems. I see that as unsustainable, as well as unnecessary: Go kit is designed specifically to allow consumers to provide their own EncodeJSONResponse functions. Can you suggest some wording for the docs that would make this clear? |
Something like
? |
SGTM |
Can you suggest "where" to put this sentence in the documentation?
|
What would you like?
Overview
Since release
v1.11.0
, nats.go supports message headers. headers are very useful to transfer metadata together with messages.I'm proposing to add basic support for headers in the default response encoder.
Proposed API
The idea is to do something similar it's done for
transport/http
with theHeaderer
interface. API change proposal is backward compatible (no public API change)If the proposal is accepted I can raise a PR
The text was updated successfully, but these errors were encountered: