Skip to content

Tim-Zhang/hyper-aws4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hyper-aws4

NPM version build status Test coverage

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

About

AWS Signature Version 4 Signing Library for Hyper

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published