Created
March 28, 2018 13:03
-
-
Save TimoDJatomika/0ca49795d97dfcc5b2b13a1bb67b4202 to your computer and use it in GitHub Desktop.
Function that takes an alexa request an in input and redirects the request to a custom api endpoint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
def lambda_handler(event, context): | |
url = "https://api.example.com/alexa.php" | |
r = requests.post(url, data=json.dumps(event)) | |
return r.json() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment