enum HttpMethod
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Apigatewayv2.HttpMethod |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsapigatewayv2#HttpMethod |
Java | software.amazon.awscdk.services.apigatewayv2.HttpMethod |
Python | aws_cdk.aws_apigatewayv2.HttpMethod |
TypeScript (source) | aws-cdk-lib » aws_apigatewayv2 » HttpMethod |
Supported HTTP methods.
Example
import { HttpUrlIntegration, HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations';
const getBooksIntegration = new HttpUrlIntegration('GetBooksIntegration', 'https://get-books-proxy.example.com');
declare const bookStoreDefaultFn: lambda.Function;
const bookStoreDefaultIntegration = new HttpLambdaIntegration('BooksIntegration', bookStoreDefaultFn);
const httpApi = new apigwv2.HttpApi(this, 'HttpApi');
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.GET ],
integration: getBooksIntegration,
});
httpApi.addRoutes({
path: '/books',
methods: [ apigwv2.HttpMethod.ANY ],
integration: bookStoreDefaultIntegration,
});
Members
Name | Description |
---|---|
ANY | HTTP ANY. |
DELETE | HTTP DELETE. |
GET | HTTP GET. |
HEAD | HTTP HEAD. |
OPTIONS | HTTP OPTIONS. |
PATCH | HTTP PATCH. |
POST | HTTP POST. |
PUT | HTTP PUT. |
ANY
HTTP ANY.
DELETE
HTTP DELETE.
GET
HTTP GET.
HEAD
HTTP HEAD.
OPTIONS
HTTP OPTIONS.
PATCH
HTTP PATCH.
POST
HTTP POST.
PUT
HTTP PUT.