PHP code example of nimaebrazi / php-http-client

1. Go to this page and download the library: Download nimaebrazi/php-http-client 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/ */

    

nimaebrazi / php-http-client example snippets




$response = \NimaEbrazi\HttpClient\ClientFactory::guzzle()->get('YOUR_URL');
$response = \NimaEbrazi\HttpClient\ClientFactory::guzzle()->post('YOUR_URL');
$response = \NimaEbrazi\HttpClient\ClientFactory::guzzle()->put('YOUR_URL');

$response = \NimaEbrazi\HttpClient\ClientFactory::guzzle([
                'config_key' => 'config_value
             '])->get('YOUR_URL');

$response = \NimaEbrazi\HttpClient\ClientFactory::guzzle()->get('YOUR_URL', ['OPTION_KEY' => 'OPTION_VALUE']);