aws-api-gateway-client
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -48,3 +48,4 @@ 'use strict'; | ||
defaultContentType: 'application/json', | ||
defaultAcceptType: 'application/json' | ||
defaultAcceptType: 'application/json', | ||
systemClockOffset: 0 | ||
}; | ||
@@ -78,2 +79,5 @@ } | ||
} | ||
if (typeof config.systemClockOffset === 'undefined') { | ||
config.systemClockOffset = 0; | ||
} | ||
@@ -93,3 +97,4 @@ // extract endpoint and path from url | ||
defaultContentType: config.defaultContentType, | ||
defaultAcceptType: config.defaultAcceptType | ||
defaultAcceptType: config.defaultAcceptType, | ||
systemClockOffset: config.systemClockOffset | ||
}; | ||
@@ -96,0 +101,0 @@ |
@@ -197,3 +197,3 @@ 'use strict'; | ||
var datetime = new Date().toISOString().replace(/\.\d{3}Z$/, 'Z').replace(/[:\-]|\.\d{3}/g, ''); | ||
var datetime = new Date(new Date().getTime() + config.systemClockOffset).toISOString().replace(/\.\d{3}Z$/, 'Z').replace(/[:\-]|\.\d{3}/g, ''); | ||
headers[X_AMZ_DATE] = datetime; | ||
@@ -200,0 +200,0 @@ var parser = _url2.default.parse(awsSigV4Client.endpoint); |
{ | ||
"name": "aws-api-gateway-client", | ||
"version": "0.2.5", | ||
"description": "Node.js moduel for AWS API Gateway client", | ||
"version": "0.2.6", | ||
"description": "A moduel for AWS API Gateway client", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
[![dependencies Status](https://david-dm.org/kndt84/aws-api-gateway-client/status.svg)](https://david-dm.org/kndt84/aws-api-gateway-client) | ||
# Overview | ||
Node.js module for AWS API gateway client based on auto-generated JavaScript SDK for browsers. In addition, this module generalizes endpoint specific methods. | ||
A module for AWS API gateway client based on auto-generated JavaScript SDK. This module can be used not only for Node.js but for front-end. | ||
@@ -72,2 +72,3 @@ Reference: | ||
region: 'eu-west-1' // OPTIONAL: The region where the API is deployed, by default this parameter is set to us-east-1 | ||
systemClockOffset: 0 // OPTIONAL: An offset value in milliseconds to apply to signing time | ||
}); | ||
@@ -74,0 +75,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27595
518
97