PHP Classes

File: docs/pingIndex.php

Recommend this page to a friend!
  Packages of Kjell-Inge Gustafsson   PHP REST API Server   docs/pingIndex.php   Download  
File: docs/pingIndex.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP REST API Server
REST API server handling requests with callbacks
Author: By
Last change:
Date: 7 years ago
Size: 426 bytes
 

Contents

Class file image Download
<?php
/**
 * pingIndex.php
 *
 * @author      Kjell-Inge Gustafsson <ical@kigkonsult.se>
 *
 * Simply checking service is up
 * Open in a web browser http://<host>/<path>/pingIndex.php/ping
 *  method 'GET'
 *  uri    '/ping'
 * Return (array) classname, version and time
 */

namespace Kigkonsult\RestServer;

include '../vendor/autoload.php';

(new RestServer())->attachRestService( restServer::getPingServiceDef())->run();