2.1.0 • Published 8 years ago

superagent-cli v2.1.0

Weekly downloads
2
License
-
Repository
github
Last release
8 years ago

Super Agent CLI

A command line interface for the superagent rest library. Designed to make testing JSON apis from the command line easier.

to install:

npm install -g superagent-cli

the super agent cli command is superagent and requests look like the following:

superagent or superagent -h to display help
superagent <url> <rest method(get|post|put|patch|delete)> <json data>
superagent www.google.com
superagent www.google.com get
superagent localhost:3000 post '{"hello":"world"}'
superagent localhost:3000 post {hello: \'world\'}

Note: if using javascript literal notation (instead of fully qualified JSON) all quotes around string must be escaped ex: {hello: 'world'} must actually be hello: \'world\' or use two sets of quotes {hello: "'super world'"} which will keep white space the same

superagent-cli can also add basic HTTP Auth to any request with with -u username:password

superagent -u username:password localhost:3000

superagent-cli can read json data from a file using the -f parameter.

superagent example.com/test post -f request_body.json

superagent-cli can set arbitrary headers with -H

superagent -H "Accept: text/plain, X-Arbitrary-Header: true" example.com
2.1.0

8 years ago

2.0.0

9 years ago

1.5.5

9 years ago

1.4.5

9 years ago

1.4.4

9 years ago

1.4.3

9 years ago

1.4.2

9 years ago

1.3.2

9 years ago

1.3.1

9 years ago

1.3.0

9 years ago

1.2.0

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago