Voiceflow not seeing HTTP POST request handler's response data
--------------------HANDLER
<?php
// Check if the request method is POST
if ($_SERVER["REQUEST_METHOD"] === "POST") {
// Process the request
$postData = $_POST; // Get the POST data
// Perform any necessary processing or validation
// Generate response
$response = array(
"status" => "success!",
"message" => "Request processed successfully",
"data" => $postData // Return any data as needed
);
// Send JSON response
header('Content-Type: application/json');
echo json_encode($response);
} else {
// Handle other request methods (optional)
http_response_code(405); // Method Not Allowed
echo "This endpoint only accepts POST requests.";
}
?>
--------------------- REQUESTOR OUTPUT
Response: {"status":"success","message":"Request processed successfully","data":{"username":"john","password":"password123"}}
--------------------- VOICEFLOW RESPONSE DISPLAY (no status, message nor data included. why?)
{
"VF_STATUS_CODE": 200,
"VF_HEADERS": {
"connection": "close",
"content-encoding": "gzip",
"content-type": "text/html; charset=UTF-8",
"date": "Fri, 01 Mar 2024 19:28:44 GMT",
"strict-transport-security": "max-age=15724800; includeSubDomains",
"transfer-encoding": "chunked",
"vary": "Accept-Encoding",
"x-powered-by": "PHP/8.1.23"
}
}
included image of API step settings

