Skip to content

Commit

Permalink
fix(aws-apigateway): add integrationHttpMethod prop to AwsIntegration
Browse files Browse the repository at this point in the history
fixes aws#2105
  • Loading branch information
unstubbable committed Apr 2, 2019
1 parent 2e92d44 commit 9492e43
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion packages/@aws-cdk/aws-apigateway/lib/integrations/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,14 @@ export interface AwsIntegrationProps {
*/
readonly actionParameters?: { [key: string]: string };

/**
* The integration's HTTP method type.
* Required unless you use a MOCK integration.
*
* @default POST
*/
readonly integrationHttpMethod?: string;

/**
* Integration options, such as content handling, request/response mapping, etc.
*/
Expand All @@ -70,7 +78,7 @@ export class AwsIntegration extends Integration {
const { apiType, apiValue } = parseAwsApiCall(props.path, props.action, props.actionParameters);
super({
type,
integrationHttpMethod: 'POST',
integrationHttpMethod: props.integrationHttpMethod || 'POST',
uri: new cdk.Token(() => {
if (!this.scope) { throw new Error('AwsIntegration must be used in API'); }
return this.scope.node.stack.formatArn({
Expand Down

0 comments on commit 9492e43

Please sign in to comment.