httpie / cli

🥧 HTTPie CLI — modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more.
https://httpie.io
BSD 3-Clause "New" or "Revised" License
33.22k stars 3.67k forks source link

Support a flag/option to delete a named session #974

Open segevfiner opened 3 years ago

segevfiner commented 3 years ago

Currently when you need to delete a named session (For example, it has some problem cookies that shouldn't be sent anymore), you need to go to the sessions directory and delete the file by yourself. It would be convenient if httpie had a flag/option/subcommand to delete a named session, e.g. httpie --delete-session=somesession :8080 (Might want it to not also send a request when doing so).

isidentical commented 2 years ago

Interesting approach. This makes me notice that we might want to introduce an httpie sessions command to manage session state in a blind way.

For example, currently, we ask users to use ls to list all sessions from a long path, which might be very inconvenient to type everytime you forget the name of the session you are looking for. We could perhaps create httpie sessions list and httpie session delete <name> to startwith, and then extend them further. CC: @jakubroztocil