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

[Feature Request]: Remember body file pathes, allow http-remote files, render them in code preview #204

Open
dragoangel opened this issue Jan 10, 2025 · 0 comments

Comments

@dragoangel
Copy link

dragoangel commented Jan 10, 2025

At the moment if body in request is File:

  • file itself doesn't remembered, so you each time need to choose it
  • code preview doesn't render it at all for any closable option

If body in request is Form:

  • name of the form is remembered, but file - doesn't
  • code preview does render it, but it render only a file name instead of full path

It would be very useful if this issue would be solved:

  1. allow to remember path to local files
  2. allow to point to some http(s) files so they can be used on different PCs, basically under the hood allow to download body to the httpie tmp dir from some http(s) page and then use it in request. We can here do smart thing like saving file with metadata like E-tag & Modified-Date if they available and last fetch time, and if fetch time greater then 1m do HEAD first, check E-tag & Modified-Date - and do actual GET (body) only if they newer then we have locally, plus update last fetch time in any case (take that idea from Rspamd honestly).
  3. fix rendering of the code snippets to properly render full path, for remote path we can just render like temp=$(mktmp) && wget $body-url -O $temp && curl $url --upload-file $temp for File and same for Form but as much as needed times.

Thank devs for very cool project!

@dragoangel dragoangel changed the title [Feature Request]: Remember body file pathes, render them in code preview [Feature Request]: Remember body file pathes, allow http-remote files, render them in code preview Jan 10, 2025
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

No branches or pull requests

1 participant