Coder Social home page Coder Social logo

cf-signed-request's Introduction

cf-signed-request

CLI for signed requests to cf-api

build status dependency status

Installation

npm install -g cf-signed-request

Usage

    cf-req --api-key=KEY --api-id=ID --url=URL [options]
    cf-req --login [login-url]

  Options:

    -h, --help           output usage information
    -V, --version        output the version number
    --api-key <key>      API key
    --api-id <id>        API ID
    --url <url>          URL
    --method <method>    Request method
    --login <login-url>  Login and get API key & ID
    -H, --header         HTTP header
    --compressed         Unsupported cURL command
    -o, --output <file>  Output to a file instead of stdout
    -d, --data <data>    POST data

###To login:

cf-req --login=[login-url]

The login url must be where the authentication happens, eg:

cf-req --login=http://localhost:3832/auth

This will ask for the users email and password, and returns the API key and ID.

###To perform requests:

cf-req --api-key=[api-key] --api-id=[api-id] --url=[api-url] [options]

Will perform a request of the specified type (defaults to GET) to the specified URL and displays the body of the response. Custom headers can be passed and will override any existing ones.

##Arguments

Argument Usage Example
-h, --help Display help cf-req -h
-V, --version Display version cf-req -V
--api-key <key> The API key See --url
--api-id <id> The API ID See --url
--url <url> The API url
Must include protocol
cf-req --api-key XYZ --api-id ABC --url http://localhost:3832/api
--login <url> The URL where user credentials are authenticated and API key/ID is returned.
Credentials are given in a friendly copy-paste format.
cf-req --login http://localhost:3831/auth
-H, --header '<header>' Supply additional headers.
Multiple headers may eb given, and will override application defaults.
cf-req --api-key XYZ --api-id ABC --url http://localhost:3832/api -H 'cf-keep-data:true'

Credits

Jack Burgess

License

ISC

cf-signed-request's People

Contributors

jack828 avatar

Watchers

 avatar

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.