-
Notifications
You must be signed in to change notification settings - Fork 389
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
feat: add headers to grpcurl command #248
Conversation
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.
LGTM! I'll need to pull the branch and test it tho.
if (name !== "") { | ||
metadataStr += ` -H "${name}: ${val}"`; | ||
} | ||
} |
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.
One thing I noticed, changing keys/values/rows in the headers doesn't trigger updateCurlCommand
. I'm not sure if it's worth the level of invasiveness that would require tho. Thoughts?
Maybe we could always just force a re-render when the Raw Request tab is shown instead of the crazy stuff we're currently doing.
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.
For example, I noticed a bug where on first render, if you load the app (or change the selected method) and click on the raw request tab, the curl command contains an [object Object]
instead of {}
.
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.
Yes. I agree with you. For example, the updateCurlCommand func receives the entire request instead just the body. I believe this would involve a larger PR of refactoring. But for now, due to lack of time, I can't do that. Merging this PR would help people here a lot.
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.
fair enough
Grpcurl command was missing headers parameters. This PR adds it.