mfinelli / cui Goto Github PK
View Code? Open in Web Editor NEWhttp request/response tui
License: GNU General Public License v3.0
http request/response tui
License: GNU General Public License v3.0
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.
Improve startup time by loading history in a separate go routine
Originally posted by @mfinelli in #7 (comment)
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)
Form data behaves a little differently, we should show the fields/values similarly to how we display/edit headers and query parameters
Log file is currently being written into the current working directory, we need to write it to ~/.cache/cui/cui.log
instead.
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.
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).
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.
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
Response View, Request View, and Dev Server response
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.