diff --git a/Source/API/script/index.php b/Source/API/script/index.php index 927103e..5d58dea 100644 --- a/Source/API/script/index.php +++ b/Source/API/script/index.php @@ -29,16 +29,16 @@ try{ $parameters = $request->getQueryParams(); $method = $parameters['method']; unset($parameters['method']); - $response->getBody()->write($method); $listGateway = array("\\Gateway\\GatewayForm", "\\Gateway\\GatewayKeyword", "\\Gateway\\GatewayQuestion"); foreach ($listGateway as $gateway) // Pour chaque Gateway { if (method_exists($gateway, $method)) { - $response->getBody()->write((new $gateway)->$method($parameters)); // Si oui, on appelle cette fonction + //$response->getBody()->write(print_r((new $gateway)->$method($parameters))); // Si oui, on appelle cette fonction + $response->getBody()->write(print_r(array('response' => "Rien", 'test' => "Test Ici"))); } } - return $response; - //return $response->withHeader('Content-type', 'application/json'); + //return $response; + return $response->withHeader('Content-type', 'application/json'); }); }catch (TypeError $t){ echo "Error, wrong parameters key, or no parameters write : ".$t->getMessage();