<!-- Love localstack? Please consider supporting our collective:
👉  https://opencollective.com/localstack/donate -->

# Type of request: This is a bug

[ X ] bug report
[ ] feature request

# Detailed description

It seems there is a bug in the value of the `httpMethod` in the request that is sent to lambda from the API Gateway.

Given the following terraform description the API gateway no matter what the method called passes httpMethod as "POST" and not the method used to make the request to the API gateway, it only gets passed through if the `integration_http_method` is changed to `ANY`, but this is not compatible with what AWS expects.

The `intergration_http_method` is the method that will be used to make the HTTP request to the backend service, not the method that will be reported in the `httpMethod` field.

## Expected behavior
The API Gateway invokes the lambda with the field httpMethod set to the HTTP method that was used to invoke the API Gateway


## Actual behavior
The API Gateway invokes the lambda with the field httpMethod set to the HTTP method that was used to invoke the lambda.


# Steps to reproduce

Create a lambda that is invoked via the api Gateway on a `GET` request, check the `httpHeaders` field.

## Command used to start LocalStack

`docker-compose up`

## Client code (AWS SDK code snippet, or sequence of "awslocal" commands)

```
resource "aws_api_gateway_resource" "proxy" {
   rest_api_id = aws_api_gateway_rest_api.test.id
   parent_id   = aws_api_gateway_rest_api.test.root_resource_id
   path_part   = "{proxy+}"
}
resource "aws_api_gateway_method" "proxy" {
   rest_api_id   = aws_api_gateway_rest_api.test.id
   resource_id   = aws_api_gateway_resource.proxy.id
   http_method   = "ALL"
   authorization = "NONE"
}

resource "aws_api_gateway_integration" "lambda" {
   rest_api_id = aws_api_gateway_rest_api.test.id
   resource_id = aws_api_gateway_method.proxy.resource_id
   http_method = aws_api_gateway_method.proxy.http_method
   # Bug in localstack seems to mean that the API gateway passes the integration method as the httpMethod
   integration_http_method = "POST"
   type                    = "AWS_PROXY"
   uri                     = aws_lambda_function.tests_v2.invoke_arn
}
```

I hope this is enough detail, if not I should be able to make a terraform file and a small lambda application to demonstrate the issue.

I think the issue is this line, that should be `'httpMethod': method,` using the method that is passed in from the top of the function

https://github.com/localstack/localstack/blob/bc5fabf870b0af6060875b8d07396b4dbce6adc8/localstack/services/apigateway/apigateway_listener.py#L282


import os
import re
import json
import base64
import unittest
import xmltodict
from botocore.exceptions import ClientError
from jsonpatch import apply_patch
from requests.s import Response
from requests.structures import CaseInsensitiveDict
from localstack import config
from localstack.constants import PATH_USER_REQUEST, TEST_AWS_ACCOUNT_ID
from localstack.utils import testutil
from localstack.utils.aws import aws_stack
from localstack.utils.common import (
    to_str, json_safe, clone, short_uid, get_free_tcp_port, load_file, safe_requests as requests)
from localstack.services.generic_proxy import GenericProxy, ProxyListener
from localstack.services.awslambda.lambda_api import add_event_source
from localstack.services.apigateway.helpers import (
    get_rest_api_paths, get_resource_for_path, connect_api_gateway_to_sqs)
from .test_lambda import TEST_LAMBDA_PYTHON, TEST_LAMBDA_LIBS
THIS_FOLDER = os.path.dirname(os.path.realpath(__file__))