PHP code example of prestashop / module-lib-guzzle-adapter
1. Go to this page and download the library: Download prestashop/module-lib-guzzle-adapter 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/ */
prestashop / module-lib-guzzle-adapter example snippets
# Getting a client (Psr\Http\Client\ClientInterface)
$options = ['base_url' => 'http://some-url/'];
$client = (new Prestashop\ModuleLibGuzzleAdapter\ClientFactory())->getClient($options);
# Sending requests and receive response (Psr\Http\Message\ResponseInterface)
$response = $this->client->sendRequest(
new GuzzleHttp\Psr7\Request('POST', 'some-uri')
);