# AllowedMethods

The HTTP methods that the Behavior will accept requests on.

- Source: [`aws-cloudfront/lib/distribution.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-cloudfront/lib/distribution.ts#L1018)

## Example

```ts
// Create a Distribution with configured HTTP methods and viewer protocol policy of the cache.
declare const myBucket: s3.Bucket;
const myWebDistribution = new cloudfront.Distribution(this, 'myDist', {
  defaultBehavior: {
    origin: new origins.S3Origin(myBucket),
    allowedMethods: cloudfront.AllowedMethods.ALLOW_ALL,
    viewerProtocolPolicy: cloudfront.ViewerProtocolPolicy.REDIRECT_TO_HTTPS,
  },
});
```

## Properties

- `ALLOW_ALL`: [AllowedMethods](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.AllowedMethods.html) (static) — All supported HTTP methods.

- `ALLOW_GET_HEAD`: [AllowedMethods](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.AllowedMethods.html) (static) — HEAD and GET.

- `ALLOW_GET_HEAD_OPTIONS`: [AllowedMethods](/cdk/api/v2/docs/aws-cdk-lib.aws_cloudfront.AllowedMethods.html) (static) — HEAD, GET, and OPTIONS.

- `methods`: string[] — HTTP methods supported.
