PHP code example of shahariaazam / http-client-support
1. Go to this page and download the library: Download shahariaazam/http-client-support 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/ */
shahariaazam / http-client-support example snippets
namespace ShahariaAzam\HTTPClientSupport;
class YourClass extends HTTPSupport
{
// Now your class have the following method already
// public function setHttpClient(ClientInterface $httpClient)
// public function getHttpClient()
// public function getHttpHeaders()
// public function setHttpHeaders()
// public function getHttpHeaders()
// Now perform HTTP request with the following method
// public function httpRequest($method, $uri, $headers = [], $body = null, $version = '1.1')
}