toastynerd/superagent-cli — pull request #4 by david-davidson (2014-11-23 19:28:45+00:00)
Title: Parse object literals, not just strict JSON

Oh sup @toastynerd!

I use this tool all the time, and I often forget that I need to format my requests as strict JSON--I'll try something like `superagent url verb {foo: 'bar'}`, not (the correct) `superagent url verb '{"foo": "bar"}'`. The former syntax is easier to read and write, too, with less room for human error.

What if superagent-cli could parse *both* options?

PR summary:
* Update Parser.prototype.parseRequest to handle either strict JSON or object literal syntax
* Add unit test to make sure it works (and doesn't break your other tests :)