TEMP : remove print_r, try with a foreach and with a =>, remove json_encode
continuous-integration/drone/push Build is passing Details

master
dorian.hodin 2 years ago
parent 6cdf706b32
commit 6477195c68

@ -41,7 +41,7 @@ try{
} }
$temp = array('response' => "Rien", 'test' => "Test Ici"); $temp = array('response' => "Rien", 'test' => "Test Ici");
foreach ($temp as $key => $value) { foreach ($temp as $key => $value) {
$response->getBody()->write(json_encode($key."=>".$value));//'"'.$key.'": "'.$value.'"'); $response->getBody()->write($key."=>".$value);//'"'.$key.'": "'.$value.'"');
} }
//return $response; //return $response;
return $response->withHeader('Content-type', 'application/json'); return $response->withHeader('Content-type', 'application/json');

Loading…
Cancel
Save