PHP code example of robertov8 / guzzle-zend

1. Go to this page and download the library: Download robertov8/guzzle-zend 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/ */

    

robertov8 / guzzle-zend example snippets



use ZendAdapter\ZendRequest as Client;

p://httpbin.org',
    'timeout'  => 2.0,
]);

$response = $client->request('GET', '/root');
$response = $client->request('GET', '/root');
$responseBody = $response->getBody();
$responseBodyContents = $responseBody->getContents();


use GuzzleHttp\Client;

ase_uri' => 'http://httpbin.org',
    'timeout'  => 2.0,
]);

$response = $client->request('GET', '/root');
$responseBody = $response->getBody();
$responseBodyContents = $responseBody->getContents();