PHP code example of http-message-strategies-interop / example-guzzle-get

1. Go to this page and download the library: Download http-message-strategies-interop/example-guzzle-get 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/ */

    

http-message-strategies-interop / example-guzzle-get example snippets


use Interop\Http\Message\Strategies\Examples\GuzzleGet\GuzzleGet;
use GuzzleHttp\Psr7\Request;

$gget = new GuzzleGet(['base_uri' => 'https://httpbin.org']);

$response0 = $gget(new Request('GET', '/'));
$response1 = $gget(new Request('GET', '/get'));