-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add support for --bytes-as-base64 #611
Conversation
I tried extending @ktr0731, @BenSlabbert, any thoughts? |
5fff718
to
f3e26c2
Compare
Hmmh, we output bytes as base64, like grpcurl does. It would feel much more natural if this was the default TBH. |
This allows entering bytes as a base64-encoded string, using the standard encoding.
f3e26c2
to
f210962
Compare
poke @ktr0731 . WDYT? Happy to rework this patch to accept bytes as base64 by default, if you prefer that. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #611 +/- ##
==========================================
- Coverage 80.17% 80.01% -0.16%
==========================================
Files 57 57
Lines 3848 3858 +10
==========================================
+ Hits 3085 3087 +2
- Misses 536 542 +6
- Partials 227 229 +2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. The content is very informative, LGTM, thank you!
Thanks for the merge! What's your opinion on making base64 input for bytes the default, to be symmetrical with the output? (As in #611 (comment) ) |
Oh, I missed that 🙏 |
You can revert your merged changes since I haven't released a new version yet. |
I'm not sure I understand the task exactly. I honestly doubt someone is using byte literals or unicode literals to enter bytes (especially considering we output base64). My proposal would be to accept base64 by default, (keep |
As per ktr0731#611 (comment), this keeps thing symmetrical with the output, and how grpcurl handles it as well. The old quoted literal behaviour is still accessible via `--bytes-as-quoted-literals`.
This is implemented in #631, PTAL. |
This allows entering bytes as a base64-encoded string, using the standard encoding.
Suggested in #610