Introduce a new interface Wikimedia/Http/TelemetryHeadersInterface that provides telemetry information that could be attached to HTTP Requests. MultiHttpClient is expecting `telemetry` option of TelemetryHeadersInterface type. The MediaWiki/Http/Telemetry implements the interface, therefore ObjectCache can inject it to RESTBagOStuff, that further injects it to MultiHttpClient. Bug: T344926 Change-Id: I59a3f1048c403fe2e4ef0c74353dfe74ff9ca893
17 lines
292 B
PHP
17 lines
292 B
PHP
<?php
|
|
|
|
namespace Wikimedia\Http;
|
|
|
|
/**
|
|
* Provide Request Telemetry information
|
|
* @unstable
|
|
* @since 1.41
|
|
*/
|
|
interface TelemetryHeadersInterface {
|
|
|
|
/**
|
|
* Get Headers to outgoing requests
|
|
* @return array<string, string> Headers array
|
|
*/
|
|
public function getRequestHeaders(): array;
|
|
}
|