<!-- 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 re
import json
import time
import logging
import requests
import datetime
from flask import Response as FlaskResponse
from six.moves.urllib_parse import urljoin
from requests.models import Response
from localstack.utils import common
from localstack.config import TEST_KINESIS_URL, TEST_SQS_URL
from localstack.constants import APPLICATION_JSON, PATH_USER_REQUEST, TEST_AWS_ACCOUNT_ID
from localstack.utils.aws import aws_stack
from localstack.utils.common import to_str, to_bytes
from localstack.utils.analytics import event_publisher
from localstack.services.kinesis import kinesis_listener
from localstack.services.awslambda import lambda_api
from localstack.services.apigateway import helpers
from localstack.services.generic_proxy import ProxyListener
from localstack.utils.aws.aws_responses import flask_to_requests_response, requests_response, LambdaResponse
from localstack.services.apigateway.helpers import (get_resource_for_path, handle_authorizers,
    extract_query_string_params, extract_path_params, make_error_response, get_cors_response)
LOGGER = logging.getLogger(__name__)
PATH_REGEX_AUTHORIZERS = r'^/restapis/([A-Za-z0-9_\-]+)/authorizers(\?.*)?'
PATH_REGEX_RESPONSES = r'^/restapis/([A-Za-z0-9_\-]+)/gatewayresponses(/[A-Za-z0-9_\-]+)?(\?.*)?'
PATH_REGEX_USER_REQUEST = r'^/restapis/([A-Za-z0-9_\-]+)/([A-Za-z0-9_\-]+)/%s/(.*)$' % PATH_USER_REQUEST
GATEWAY_RESPONSES = {}
class AuthorizationError(Exception):