PHP code example of drhino / request

1. Go to this page and download the library: Download drhino/request library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

drhino / request example snippets


 declare(strict_types=1);

# uteCollector $r) {

    $r->get('/{name}', drhino\Request\Example\IndexHandler::class);

    $r->post('/', drhino\Request\Example\PostHandler::class);

};

// Default headers, unless otherwise specified in the response.
$headers = [
    'Access-Control-Allow-Origin' => '*',
    'Cache-Control' => 'no-store'
];

new \drhino\Request\Handler($routes, $headers);