http-aws4
Performs AWS Signature Version 4-signed HTTP requests from the command line.
Last updated 2 years ago by timdp .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install http-aws4 
SYNC missed versions from official npm registry.

http-aws4

npm Dependencies JavaScript Standard Style

Performs AWS Signature Version 4-signed HTTP requests from the command line.

Inspired by the awesome HTTPie.

Installation

npm i -g http-aws4

Usage

Perform a GET on your AWS Elasticsearch index called blog:

haws https://search-....us-east-1.es.amazonaws.com/blog

Delete the blog index:

haws delete https://search-....us-east-1.es.amazonaws.com/blog

Options

--print FLAGS, -p FLAGS

Controls which parts of the request are output. Allowed flags:

Flag Meaning
H Request headers
B Request body
h Response headers
b Response body

For example, -p Hhb would print the request headers, the response headers, and the response body.

The default value is hb (response headers and response body), except for redirected output, where it is b (response body).

--pretty OUTPUT

Controls pretty-printing of the response body. Allowed values:

Value Meaning
all Both colors and formatting
colors Just colors
format Just formatting
none Raw

The default value is all, except for redirected output, where it is none.

--region REGION, -r REGION

If the name of the AWS region cannot be detected from the URL, use this option to set it manually.

--service SERVICE, -s SERVICE

If the name of the AWS service cannot be detected from the URL, use this option to set it manually.

--profile PROFILE

Uses the specified profile. Note that setting this option will force reading credentials from the credentials file rather than from the environment.

--no-color

If you prefer not to colorize the output at all, pass this option, provided by supports-color.

Request Headers

Request headers can be specified after the URL as a space-separated list of name-value pairs, separated by a colon character. For example, this command would set the X-Foo header to bar, and the X-Baz header to quux:

haws https://... x-foo:bar x-baz:quux

Request Body

The process's standard input will be used as the request body. For example, if you have prepared an Elasticsearch bulk API request body in body.json, you can post it as follows:

haws post https://search-....us-east-1.es.amazonaws.com/_bulk <body.json

Author

Tim De Pauw

License

MIT

Current Tags

  • 1.0.1                                ...           latest (2 years ago)

16 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.10.0                                ...           3 years ago
  • 0.9.0                                ...           3 years ago
  • 0.8.1                                ...           3 years ago
  • 0.8.0                                ...           3 years ago
  • 0.7.0                                ...           3 years ago
  • 0.6.0                                ...           3 years ago
  • 0.5.1                                ...           3 years ago
  • 0.5.0                                ...           3 years ago
  • 0.4.1                                ...           3 years ago
  • 0.4.0                                ...           3 years ago
  • 0.3.0                                ...           3 years ago
  • 0.2.0                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 1
Last Month 18
Dependencies (9)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |