Skip to content

Instantly share code, notes, and snippets.

@giovanemachado
Last active March 1, 2020 14:45
Show Gist options
  • Save giovanemachado/fe6355a83a28ecea7b749d48a2846ddc to your computer and use it in GitHub Desktop.
Save giovanemachado/fe6355a83a28ecea7b749d48a2846ddc to your computer and use it in GitHub Desktop.
Código utilizado no tutorial 2
<?php
// A requisição traz conteúdo em JSON, então nós transformamos em um belo array utilizável
$arrContent = json_decode(file_get_contents("php://input"), TRUE);
switch ($strRequestType) {
case "LaunchRequest":
$arrResponse = ["response"];
break;
}
// Prepara e responde a requisição, no formato exigido pela Amazon
header('Content-Type: application/json;charset=UTF-8');
echo json_encode($arrResponse);
die();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment