swirl

3.0.0 • Public • Published

swirl

CLI for testing HTTP servers using a curl-like syntax. Powered by Unexpected and unexpected-http.

NPM version Build Status Dependency Status

This basic selection of curl switches has been implemented, but nowhere near all of them:

  • --header, -H
  • --upload-file, -T
  • --data, --data-ascii, -d
  • --method, -X
  • --cookie, -b
  • --verbose, -v
  • --silent, -s
  • --cert
  • --key
  • --cacert
  • --insecure, -k

File an issue if you need one that's not implemented.

Additionally, these switches are supported and/or work differently from regular curl:

  • --html: Render the output in HTML format. My primary use case for this is getting colored output into my clipboard like this: swirl --html -v <url> | xclip -i -selection clipboard -t text/html
  • --plugin <path>: Install the given Unexpected plugin
  • -v: Dump the entire request and response, even if the expectations aren't met. "In spirit" this is the same as curl -v, but the format is quite different

Diff example

Package Sidebar

Install

npm i swirl

Weekly Downloads

2

Version

3.0.0

License

BSD-3-Clause

Last publish

Collaborators

  • papandreou