Coder Social home page Coder Social logo

superagent-cli's Introduction

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

superagent-cli's People

Contributors

toastynerd avatar emilyaviva avatar aaron-j-krause avatar david-davidson avatar ivanoats avatar timmydoza avatar

Stargazers

David Ker avatar Taylor Wirtz avatar Porramate Lim avatar  avatar Ben Harding avatar Michael Bowen avatar  avatar Ian McCunn avatar Tim avatar Jeff Adelman avatar Scott Romney Burbidge avatar  avatar  avatar Brook Riggio           avatar John Fahey avatar  avatar Mandi Burley avatar Adam Brown avatar Larry Scroggins avatar Jordan Buckley avatar Sarah June Fischer avatar  avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

superagent-cli's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.