Skip to content
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

Merged
merged 2 commits into from
Jun 13, 2023
Merged

feat: add headers to grpcurl command #248

merged 2 commits into from
Jun 13, 2023

Conversation

gubtos
Copy link
Contributor

@gubtos gubtos commented May 30, 2023

Grpcurl command was missing headers parameters. This PR adds it.

@gubtos gubtos requested review from dragonsinth June 1, 2023 13:37
Copy link
Member

@dragonsinth dragonsinth left a 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}"`;
}
}
Copy link
Member

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.

Copy link
Member

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 {}.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough

@dragonsinth dragonsinth merged commit 8743d41 into fullstorydev:master Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants