Closed rmichela closed 6 years ago
I understand that the AmbientContext is a helper to get Metadata values from endpoint methods, is that correct ? Do you know if there's a way to add metadata values to responses ?
Request trailers can contain additional Metadata, although trailer metadata isn't readily accessible from stub API. Individual response messages cannot have their own metadata.
The question is: can I get metadata in a Rxgrpc stub API from the Ambient context ?
I haven't tried that yet, but it should work in theory. You would have to add the ambient context interceptors when using ManagedChannelBuilder
and ServerBuilder
. Since ambient context leverages the standard grpc Context
, and RxGrpc correctly handles the Context
, it should "just work".
Great ! This can be very helpful !
Codecov Report
77.5% <77.5%> (ø)
22 <22> (?)
80% <80%> (ø)
2 <2> (?)
86.66% <86.66%> (ø)
9 <9> (?)
87.5% <87.5%> (ø)
7 <7> (?)
87.5% <87.5%> (ø)
7 <7> (?)
88.88% <88.88%> (ø)
3 <3> (?)
Continue to review full report at Codecov.