Loading api/v1/.htaccess 0 → 100644 +2 −0 Original line number Diff line number Diff line RewriteEngine on RewriteRule services$ /api/v1/services.php api/v1/services.php 0 → 100644 +24 −0 Original line number Diff line number Diff line <?php // TODO Replace this with actual true data $services = [ array( "name" => "Website", "host" => "fachschaft.cl.uni-heidelberg.de", "status" => "up", "category" => "public" ), array( "name" => "Tickets", "host" => "tickets.cl.uni-heidelberg.de", "status" => "up", "category" => "public" ), ]; // The browser expects to see a Content-Type indication in the HTTP headers, so we // send one. If we hadn't written this, the content type would be text/html. header("Content-Type: application/json; charset=utf-8"); // Everything that is written using `echo` is sent to the client (i.e. the browser) echo json_encode($services); Loading
api/v1/.htaccess 0 → 100644 +2 −0 Original line number Diff line number Diff line RewriteEngine on RewriteRule services$ /api/v1/services.php
api/v1/services.php 0 → 100644 +24 −0 Original line number Diff line number Diff line <?php // TODO Replace this with actual true data $services = [ array( "name" => "Website", "host" => "fachschaft.cl.uni-heidelberg.de", "status" => "up", "category" => "public" ), array( "name" => "Tickets", "host" => "tickets.cl.uni-heidelberg.de", "status" => "up", "category" => "public" ), ]; // The browser expects to see a Content-Type indication in the HTTP headers, so we // send one. If we hadn't written this, the content type would be text/html. header("Content-Type: application/json; charset=utf-8"); // Everything that is written using `echo` is sent to the client (i.e. the browser) echo json_encode($services);