Open He-Pin opened 1 week ago
Is your use case not doable using client interceptors or server interceptors for adding custom header (examples)?
Thanks, the code is already inside a intercepter, I want to use extraHeaders.isNotEmpty()
instead of extraHeaders.keys().isEmpty()
It isn't clear what you're trying to achieve. If there are extra headers you want to ignore them? How is the isEmpty()
check significant? What if you just didn't call isEmpty()
? (I do assume you are doing it for a reason, I just can't tell what it is.)
Motivication:
I want to get the metadata's size, but currently I can only get it with
metadata#keys#size
, access it directly will reduce some overhead.NOTE: It was reverted in PR: https://github.com/grpc/grpc-java/pull/3008
My currently usage: