1. Go to this page and download the library: Download programster/guzzle-wrapper 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/ */
programster / guzzle-wrapper example snippets
$request = new Programster\GuzzleWrapper\Request(
Programster\GuzzleWrapper\Method::createGet(),
'http://my.domain.com',
['hello' => 'world']
);
// send the request to get a response
$response = $request->send();
// If we were sending to an API, then we want to json_decode the response
$jsonResponseObject = json_decode($response->getBody());
$request = new Programster\GuzzleWrapper\Request(
Programster\GuzzleWrapper\Method::createPost(),
'http://my.domain.com',
['hello' => 'world']
);
bash
php -S localhost:80 RequestDumper.php
bash
php main.php
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.