https://github.com/tim-zhang/hyper-aws4
AWS Signature Version 4 Signing Library for Hyper
https://github.com/tim-zhang/hyper-aws4
aws-signature hyper
Last synced: about 1 year ago
JSON representation
AWS Signature Version 4 Signing Library for Hyper
- Host: GitHub
- URL: https://github.com/tim-zhang/hyper-aws4
- Owner: Tim-Zhang
- Created: 2016-07-14T07:54:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-31T05:36:05.000Z (about 9 years ago)
- Last Synced: 2025-05-07T04:47:47.311Z (about 1 year ago)
- Topics: aws-signature, hyper
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/hyper-aws4
- Size: 12.7 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hyper-aws4
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Test coverage][coveralls-image]][coveralls-url]
AWS Signature Version 4 Signing Library for Hyper
## Installation
`$ npm install hyper-aws4`
## Example
```
var aws4 = require('hyper-aws4')
var fetch = require('node-fetch')
var signOption = {
url: 'https://us-west-1.hyper.sh/version',
method: 'GET',
credential: {
accessKey: '6DPLADBPWYXDUVXLX34EJXBL',
secretKey: '2ldD1Yz0nzATl9vvagBwYTjglXBjVOWU8gV8aMm5'
}
}
var headers = aws4.sign(signOption)
fetch(signOption.url, {method: signOption.method, headers: headers}).then(function(res) {
return res.json();
}).then(function(json) {
console.log(json);
});
```
## License
MIT
[npm-image]: https://img.shields.io/npm/v/hyper-aws4.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/hyper-aws4
[travis-image]: https://img.shields.io/travis/Tim-Zhang/hyper-aws4.svg?style=flat-square
[travis-url]: https://travis-ci.org/Tim-Zhang/hyper-aws4
[coveralls-image]: https://img.shields.io/codecov/c/github/Tim-Zhang/hyper-aws4.svg?style=flat-square
[coveralls-url]: https://codecov.io/github/Tim-Zhang/hyper-aws4?branch=master