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(ui): add cURL command to execute window #4308

Merged
merged 2 commits into from
Jul 15, 2024

Conversation

yuri1969
Copy link
Contributor

What changes are being made and why?

  • Provided just the UNIX shell version - no support for Windows CMD/PowerShell.
  • Displayed the cURL command preview as it IMHO improves the UX - the user actually sees what is copied. However, it can easily be transformed to just the Copy as cURL button.
  • The FILE input can't be really supported since browser doesn't have the full path.
  • User credentials nor SECRET inputs should be presented.
  • Componentized the copy-to-clipboard button.
  • The French translation was done via Google Translate, sorry.

closes #3585

20240711-195924_snap

* Provided just the UNIX shell version - no support for Windows CMD/PowerShell.
* Displayed the cURL command preview as it IMHO improves the UX.
* The `FILE` input can't be really supported since browser doesn't have
  the full path.
* User credentials nor `SECRET` inputs should be presented.
* Componentized the copy-to-clipboard button.
* The French translation was done via Google Translate, sorry.
@loicmathieu
Copy link
Member

Thanks a lot! This is very great!

Before one of our frontend experts reviews it, may I propose some enhancements?

  • For SECRET input type, you can add them with ****** as the value.
  • For FILE input type, they are the more complex as we use specific handling, so it would be great to show how to works by considering files are in the current working directory, so if a user have an input myfile.txt it generates a curl that will upload the myfile.txt from the current directory.
  • With these changes the WARNING cloud be updated to something like 'Note that for SECRET and FILE input type, the command must be accommodate to match the real values'.
  • Can you remove the Transfert-Encoding header, it is not mandatory

@yuri1969
Copy link
Contributor Author

@loicmathieu Done

@loicmathieu
Copy link
Member

Thanks @yuri1969 , I'll let Milos do a review

@MilosPaunovic
Copy link
Member

This has been done wonderfully, thanks a lot @yuri1969 and keep up the good work! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add a "Copy as cURL" button to the execute window
3 participants