PHP code example of cviebrock / guzzle-stripbom-plugin
1. Go to this page and download the library: Download cviebrock/guzzle-stripbom-plugin 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/ */
cviebrock / guzzle-stripbom-plugin example snippets
$client = new Guzzle\Http\Client('http://example.com');
$client->addSubscriber( new Cviebrock\Guzzle\Plugin\StripBom\StripBomPlugin() );
$request = $client->get('some/request');
$response = $client->send($request);
$data = $response->json();