blob: 574558465a9572b539c9863fb35fed6c4110bad6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import requests
from . import IntegrationParser
class TypeHttpParser(IntegrationParser):
"""
Parse invocations to a APIGateway resource with integration type HTTP
"""
def invoke(self, request, integration):
uri = integration["uri"]
requests_func = getattr(requests, integration["httpMethod"].lower())
response = requests_func(uri)
return response.status_code, response.text
|