Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-api-gateway-client

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-api-gateway-client - npm Package Compare versions

Comparing version 0.2.15 to 0.2.16

5

dist/apigClient.js

@@ -23,5 +23,2 @@ 'use strict';

// import 'babel-polyfill';
var _urlTemplate = require('url-template');

@@ -55,3 +52,3 @@

sessionToken: '',
region: 'us-east-1',
region: '',
apiKey: '',

@@ -58,0 +55,0 @@ invokeUrl: '',

2

package.json
{
"name": "aws-api-gateway-client",
"version": "0.2.15",
"version": "0.2.16",
"description": "A moduel for AWS API Gateway client",

@@ -5,0 +5,0 @@ "repository": {

@@ -36,4 +36,4 @@ [![dependencies Status](https://david-dm.org/kndt84/aws-api-gateway-client/status.svg)](https://david-dm.org/kndt84/aws-api-gateway-client)

```
var params = {
//This is where any header, path, or querystring request params go. The key is the parameter named as defined in the API
var pathParams = {
//This is where path request params go.
userId: '1234',

@@ -45,3 +45,3 @@ };

var additionalParams = {
//If there are any unmodeled query parameters or headers that need to be sent with the request you can add them here
//If there are query parameters or headers that need to be sent with the request you can add them here
headers: {

@@ -60,3 +60,3 @@ param0: '',

apigClient.invokeApi(params, pathTemplate, method, additionalParams, body)
apigClient.invokeApi(pathParams, pathTemplate, method, additionalParams, body)
.then(function(result){

@@ -74,7 +74,7 @@ //This is where you would put a success callback

var apigClient = apigClientFactory.newClient({
invokeUrl:'https://xxxxx.execute-api.us-east-1.amazonaws.com',
accessKey: 'ACCESS_KEY',
secretKey: 'SECRET_KEY',
invokeUrl:'https://xxxxx.execute-api.us-east-1.amazonaws.com', // REQUIRED
accessKey: 'ACCESS_KEY', // REQUIRED
secretKey: 'SECRET_KEY', // REQUIRED
sessionToken: 'SESSION_TOKEN', //OPTIONAL: If you are using temporary credentials you must include the session token
region: 'eu-west-1', // OPTIONAL: The region where the API is deployed, by default this parameter is set to us-east-1
region: 'eu-west-1', // REQUIRED: The region where the API is deployed.
systemClockOffset: 0, // OPTIONAL: An offset value in milliseconds to apply to signing time

@@ -93,17 +93,6 @@ retries: 4, // OPTIONAL: Number of times to retry before failing. Uses axon-retry plugin.

var apigClient = apigClientFactory.newClient({
apiKey: 'API_KEY'
invokeUrl:'https://xxxxx.execute-api.us-east-1.amazonaws.com', // REQUIRED
apiKey: 'API_KEY', // REQUIRED
region: 'eu-west-1' // REQUIRED
});
```
# Troubleshooting
The standard Javascript SDK as generated by AWS API Gateway hard codes assertions for your query parameters and headers, which is not possible in this module. Therefore, the params object passed to your `apigClient.invokeApi()` must contain keys that conform exactly to your API definitions.
```
http://example.com/prod?userId=123&info=hello&state=NY
var params = {
userId: '123',
info: 'hello',
state: 'NY'
}
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc