aws/lambda/responses/LambdaResponseGenerator.js
/**
		 * Returns an object which can be used to respond to an event trigger
		 * from the API Gateway. In other words, returns an object that can
		 * be interpreted by the API Gateway as an HTTP response.
		 *
		 * @public
		 * @param {Number} responseCode
		 * @param {Object} responseHeaders
		 * @param {*} responseData
		 * @param {Boolean=} isBase64Encoded
		 * @returns {Object}
		 */
Returns an object which can be used to respond to an event trigger
from the API Gateway. In other words, returns an object that can
be interpreted by the API Gateway as an HTTP response.


Returns an object which can be used to respond to an event trigger from the API Gateway . In other words returns an object that can be interpreted by the API Gateway as an HTTP response .
static buildResponseForApiGateway(responseCode, responseHeaders, responseData, isBase64Encoded) {
			assert.argumentIsRequired(responseCode, 'responseCode', Number);
			assert.argumentIsRequired(responseHeaders, 'responseHeaders', Object);
			assert.argumentIsOptional(isBase64Encoded, 'isBase64Encoded', Boolean);
			const response = { };
			response.statusCode = responseCode;
			response.headers = responseHeaders;
			response.body = responseData;
			if (isBase64Encoded) {
				response.isBase64Encoded = isBase64Encoded;
			}
			return response;
		}
static buildResponseForApiGateway ( responseCode , responseHeaders , responseData , isBase64Encoded ) { assert . argumentIsRequired ( responseCode , 'responseCode' , Number ) ; assert . argumentIsRequired ( responseHeaders , 'responseHeaders' , Object ) ; assert . argumentIsOptional ( isBase64Encoded , 'isBase64Encoded' , Boolean ) ; const response = { } ; response . statusCode = responseCode ; response . headers = responseHeaders ; response . body = responseData ; if ( isBase64Encoded ) { response . isBase64Encoded = isBase64Encoded ; } return response ; }
Returns an object which can be used to respond to an event trigger
 from the API Gateway.
Returns an object which can be used to respond to an event trigger from the API Gateway .