class HttpClient (View source)

Sends JSON requests to the PowerDNS HTTP API with X-API-Key, retrying GETs once on transient failures.

Methods

__construct(string $baseEndpoint, string $apiKey, LoggerInterface|null $logger = null, int $timeout = 10, bool $displayErrors = false)

No description

array
makeRequest(string $method, string $endpoint, array $data = [])

No description

Details

__construct(string $baseEndpoint, string $apiKey, LoggerInterface|null $logger = null, int $timeout = 10, bool $displayErrors = false)

No description

Parameters

string $baseEndpoint
string $apiKey
LoggerInterface|null $logger
int $timeout
bool $displayErrors

Whether error messages carry the upstream detail (misc.display_errors)

array makeRequest(string $method, string $endpoint, array $data = [])

No description

Parameters

string $method
string $endpoint
array $data

Return Value

array