Performs AWS Signature Version 4-signed HTTP requests from the command line.
npm install http-aws4  
Performs
AWS Signature Version 4-signed
HTTP requests from the command line.
Inspired by the awesome HTTPie.
``bash`
npm i -g http-aws4
Perform a GET on your AWS Elasticsearch index called blog:
`bash`
haws https://search-....us-east-1.es.amazonaws.com/blog
Delete the blog index:
`bash`
haws delete https://search-....us-east-1.es.amazonaws.com/blog
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 forb
redirected output, where it is (response body).
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.
If the name of the AWS region cannot be detected from the URL, use this option
to set it manually.
If the name of the AWS service cannot be detected from the URL, use this option
to set it manually.
Uses the specified profile. Note that setting this option will force reading
credentials from the credentials file rather than from the environment.
If you prefer not to colorize the output at all, pass this option, provided by
supports-color.
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:
`bash`
haws https://... x-foo:bar x-baz:quux
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:
`bash``
haws post https://search-....us-east-1.es.amazonaws.com/_bulk
MIT