1
I’m developing a system that will use a webservice in PHP and the structure that will be called to run this webservice is the following:
<?php
header("Content-Type: application/json; charset=utf-8") ;
require_once( "Core.class.php" ) ;
require_once( "Nomes.class.php" ) ;
$acao = "";
$core = new Core( ) ;
$nome = new Nomes( $core ) ;
if(isset($_POST['acao'])){
$acao = $_POST['acao'];
switch ($acao) {
case "R":
$lista = $nome->search( ) ;
echo json_encode( $lista ) ;
break;
}
}
?>
I am testing in Postman putting "action" in the parameter and "R" value, but nothing returns. Before I put the if(isset($_POST['acao'])){$acao = $_POST['acao'];
that I will use to create a CRUD, it was working normally, only after that it stopped giving results. Anyone knows what could be?