@dfurnes/hey
A simple HTTP CLI tool.
Last updated 3 years ago by dfurnes .
MIT · Original npm · Tarball · package.json
$ cnpm install @dfurnes/hey 
SYNC missed versions from official npm registry.

hey (n.) – A handy command-line tool for making HTTP requests.

Build Status NPM


Installation

You can install Hey using npm:

npm install -g @dfurnes/hey

Customization

You can set aliases and default request options by creating a .hey.js file in your home directory. For example:

module.exports = function(hey) {
  return {
    sites: {
      'www.example.com': {
        // ↓ You can add aliases for favorite sites, so you can just
        //   type `hey get example/page` to load "www.example.com/page`!
        alias: 'example',
        
        // ↓ If a site should always use HTTPS, set the `forceSecure` flag!
        forceSecure: true,

        // ↓ You can set default headers to be used on all requests:
        headers: {
          'X-Secret-API-Key': '5RROHSzXQwJ9douud9u5Ln4BR'
        },
      },
   
      'www.example.org': {
        alias: 'auth-example',
        forceSecure: true,
        
        // ↓ Automatically load password from the system keychain and set HTTP Basic Auth
        //   header by using `hey.basicauth('<username>')`. Will prompt on first request.
        auth: hey.basicauth('username@example.com'),
      },
    },
  };
};

License

MIT © David Furnes

Current Tags

  • 0.0.7                                ...           latest (3 years ago)

7 Versions

  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 7
Last Month 2
Dependencies (20)
Dev Dependencies (9)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |