The Cherry-project Request wrapper
Install from composer composer require cherry-project/logger
Include Autoloader in your main file (Ex.: index.php)
require_once __DIR__ . '/vendor/autoload.php';
Import class
use Cherry\HttpUtils\Request;
Crete class new object
$request = new Request();
Get request HTTP Headers
Get all headers
$allHeaders = $request->getHeaders();
Get single header (Ex.: Host)
$singleHeader = $request->getHeaders('Host');
Get more then one header
$manyHeaders = $request->getHeaders(['Accept', 'Accept-Encoding']);
Get request HTTP method
Check if request has header
Get request path(URL)
Get request scheme(http or https)
Get request query parameters
Get request query parameter by key
Get request data by method
2019 © Cherry-project