PHP code example of miquido / request-data-collector-guzzle

1. Go to this page and download the library: Download miquido/request-data-collector-guzzle 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/ */

    

miquido / request-data-collector-guzzle example snippets


'guzzle' => [
	'driver' => \Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::class,

	'decorate' => [
		'with' => \Miquido\RequestDataCollector\Collectors\GuzzleCollector\Guzzle6ClientDecorator::class,

		'abstracts' => [
			abstract => [
				'type'    => \Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::TYPE_*,
				'create'  => boolean,
				'collect' => [
					\Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_BY,
					\Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_VIA,
					\Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_METHOD,
					\Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_URI,
					\Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_HEADERS,
					\Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_OPTIONS,
				],
			],
			
			// ...
		],
	],
],

abstract => [
	'type'   => \Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::TYPE_*,
	'create' => boolean,
	'collect' => [
		// \Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_*
	],
],

abstract => [
	// ...

	'collect' => [
		\Miquido\RequestDataCollector\Collectors\GuzzleCollector\GuzzleCollector::INFO_HEADERS => [
			// We don't want Authorization header to be present in logs
			'excludes' => [
				'Authorization'
			],

			// From all headers that has been sent, only those are interesting for us
			'