Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

superagent-cli

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superagent-cli

A cli wrapper for super agent

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16
increased by433.33%
Maintainers
1
Weekly downloads
 
Created
Source

Super Agent CLI

Travis CI Badge

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

Keywords

FAQs

Package last updated on 22 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc