PHP code example of iziphp / http-message-util
1. Go to this page and download the library: Download iziphp/http-message-util 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/ */
iziphp / http-message-util example snippets
use Easy\Http\Message\Method;
use Easy\Http\Message\StatusCode;
// HTTP Request method.
$method = Method::GET; // GET
// HTTP Response status code.
$statusCode = StatusCode::OK; // 200
$phrase = $statusCode->getReasonPhrase(); // OK