# extendify/0.9.3/app/Library/Controllers/PingController.php

Extendify, version 0.9.3. 31 lines.

- Page: https://pluginprobe.com/plugins/extendify/0.9.3/code/app/Library/Controllers/PingController.php
- Raw: https://pluginprobe.com/plugins/extendify/0.9.3/raw/app/Library/Controllers/PingController.php
- Modified: 2022-05-27T00:51:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/extendify/0.9.3/code/app/Library/Controllers/PingController.php#L10-L20`.

```php
<?php
/**
 * Controls Http requests
 */

namespace Extendify\Library\Controllers;

use Extendify\Http;

if (!defined('ABSPATH')) {
    die('No direct access.');
}

/**
 * The controller for sending little bits of info
 */
class PingController
{
    /**
     * Send data about a specific topic
     *
     * @param \WP_REST_Request $request - The request.
     * @return WP_REST_Response|WP_Error
     */
    public static function ping($request)
    {
        $response = Http::post('/ping', $request->get_params());
        return new \WP_REST_Response($response);
    }
}

```
