PThorpe92 / CuTE

HTTP client/libcurl TUI front end in Rust, with request + key storage
GNU General Public License v3.0
185 stars 4 forks source link

Print response to stdout no matter what user selects #101

Closed PThorpe92 closed 1 year ago

PThorpe92 commented 1 year ago

I have found that in regular use, that copying response to clipboard SUCKS on X11 (TODO: Try to find fix for X11 clipboard issue) so unless u write to a file, the response is practically gone when you close the program.

The response should be written to stdout (pretty-printed). Although this does suck when you get the wrong response, and it's 200 lines of garbled html or xml.. so I guess that is why currently you are shown the response and given the choice of writing it out to a file.

But I guess in curl you would get that anyway, so probably in all cases, except when written to a file, the response should be printed to stdout. Maybe if the file was written, we pipe the file to cat on unix systems. (bat if it exists on the system, if not fall back to cat)