Open mgravell opened 1 year ago
Does this open up the way to have more than one input parameter (excluding context)?
Yes, although I also want to allow full body binding as protobuf implied models. But I have definitely missed an important category above - binary headers that are serialized object payloads. I'm conflicted as to whether to add this one, as header sizes are bounded. Open to thoughts, though... i.e.
..., [Header] SomeType arg, ...
..., [Header] in SomeType arg, ...
..., [Header] ref SomeType arg, ...
..., [Header] out SomeType arg, ...
(and [Trailer])
which should only work if SomeType
is recognized by the configured marshaller
Hmm, the difference between method parameter types and header types, is that the former are contracted in the interface signature , the latter are not documented anywhere, which is risky
Partly. Also no streaming for headers. And headers have more limited sizes. And the marshaller API is different (although I've suggested some improvements for that over on gRPC.Core)
How does one communicate to comsumer, the header type expected at the server?
Well, in code-first land: like the above :)
In contract-first: "you tell them"
Note ties into #284
Consider:
Thoughts?