# HttpRouteMethod

Supported values for matching routes based on the HTTP request method.

- Source: [`aws-appmesh/lib/http-route-method.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-appmesh/lib/http-route-method.ts#L4)

## Example

```ts
declare const router: appmesh.VirtualRouter;
declare const node: appmesh.VirtualNode;

router.addRoute('route-http2', {
  routeSpec: appmesh.RouteSpec.http2({
    weightedTargets: [
      {
        virtualNode: node,
      },
    ],
    match: {
      path: appmesh.HttpRoutePathMatch.exactly('/exact'),
      method: appmesh.HttpRouteMethod.POST,
      protocol: appmesh.HttpRouteProtocol.HTTPS,
      headers: [
        // All specified headers must match for the route to match.
        appmesh.HeaderMatch.valueIs('Content-Type', 'application/json'),
        appmesh.HeaderMatch.valueIsNot('Content-Type', 'application/json'),
      ],
      queryParameters: [
        // All specified query parameters must match for the route to match.
        appmesh.QueryParameterMatch.valueIs('query-field', 'value')
      ],
    },
  }),
});
```

## Members

| Member | Description |
| --- | --- |
| `GET` | GET request. |
| `HEAD` | HEAD request. |
| `POST` | POST request. |
| `PUT` | PUT request. |
| `DELETE` | DELETE request. |
| `CONNECT` | CONNECT request. |
| `OPTIONS` | OPTIONS request. |
| `TRACE` | TRACE request. |
| `PATCH` | PATCH request. |

## Referenced by

- [`HttpGatewayRouteMatch`](/v2/docs/aws-cdk-lib.aws_appmesh.HttpGatewayRouteMatch).method
- [`HttpRouteMatch`](/v2/docs/aws-cdk-lib.aws_appmesh.HttpRouteMatch).method
