This has some useful tips. I might share this with some of the folks on my team at work.
From the Cement website:
Building backend tools, and command line applications shouldn’t be a tedious task. Cement provides a light-weight and fully featured foundation to build anything from single file scripts to complex and intricately designed applications. Out of the box, your application has built-in support for configuration files, command line arguments, logging, daemonization, plugins, output rendered from template (such as Mustache, or Genshi), caching, hooks, signal handling, and so much more.
I used this the other day to quickly get a list of duplicate lines in a file.
- Intuitive, Tab-completed commands and command aliases
- Support for familiar HTTP methods GET, POST, PUT, and DELETE, as well as PATCH, HEAD, OPTIONS and TRACE
- Support for HTTP Secure connections and HTTP Basic Authentication
- Automatic URL-encoding of userinfo, paths, query-string parameters, and page fragments
- Transcripts, both verbose and summary
- Scripting via stdin
- Dead-simple cookie handling and redirect following
- Built-in help
The things you can do with htty are:
- Build a request — you can tweak the address, headers, cookies, and body at will
- Send the request to the server — after the request is sent, it remains unchanged in your session history
- Inspect the server’s response — you can look at the status, headers, cookies, and body in various ways
- Review history — a normal and a verbose transcript of your session are available at all times (destroyed when you quit htty)
- Reuse previous requests — you can refer to prior requests and copy them