GithubHelp home page GithubHelp logo

mfinelli / cui Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 1.0 847 KB

http request/response tui

License: GNU General Public License v3.0

Go 92.53% Makefile 1.84% Dockerfile 1.55% Roff 3.07% Shell 1.02%
curl http-client terminal tui

cui's People

Contributors

jootd avatar mfinelli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

jootd

cui's Issues

Implement saving response body to a file

Turn the footer into a textfield to prompt the file name and then write the (raw) response to the file. We'll probably need to implement better error handling in the event that the file can't be opened, or written to, etc and panicing is not really good UX. Since we're (sometimes) coloring the response for display we'll need to keep a copy of it to use for writing the actual raw response.

Add autocomplete for some header values

The most obvious one would be if the header key is content-type we can provide an autocomplete list of mime types (and probably just a subset of plain text types + application/json, etc)

Implement form data handling

Form data behaves a little differently, we should show the fields/values similarly to how we display/edit headers and query parameters

Add basic auth header shortcut

It's a common pattern, so we should prompt for the username and password and then do Basic base64(username:password) automatically instead of requiring the user to do it beforehand.

Make a note in the readme somewhere that saved requests are stored in plain text, including auth headers, this is a tool for dev you shouldn't be using real passwords.

Add response size (bytes) to view

Best place is probably next to the "status" line e.g., "Status: 200, Response size: 400 bytes". It would be nice to make it human readable (with a toggle to raw bytes).

Implement using $EDITOR to edit the request body

I'm not actually sure how this will work or if it's possible at all. In theory create a tempfile and pass it to $EDITOR (e.g., vim) on the command line and then assuming that program takes the entire screen real estate but gives it back on exit then read in the value from the tempfile and then delete it.

Add syntax highlighting

For responses (and also probably request at least if json) add syntax highlighting. Probably easiest to start with JSON but it would be nice if it could also handle e.g., html, and xml

Implement interface clear/reset

It should be possible to reset the interface to a clean/vanilla state (as if the program was just started) without needing to quit/exit and restart it

Implement request history

To start just dump request settings in a json file (when executing the request) into ~/.cache/cui/requests then read that directory on startup. Open additional issues to handle manually deleting old requests and/or automatic pruning of the requests.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.