FOSSology  4.5.1
Open Source License Compliance by Open Source Software
Fossology\Lib\Util\HttpUtils Class Reference
Collaboration diagram for Fossology\Lib\Util\HttpUtils:
Collaboration graph

Static Public Member Functions

static getGuzzleClient (array $SysConf, string $baseUri, string $token="")
 
static checkLicenseDBHealth (string $getHealth, $guzzleClient)
 

Detailed Description

Definition at line 15 of file HttpUtils.php.

Member Function Documentation

◆ checkLicenseDBHealth()

static Fossology\Lib\Util\HttpUtils::checkLicenseDBHealth ( string  $getHealth,
  $guzzleClient 
)
static

Checks the health status of the license database by sending a GET request to a specified health endpoint. Returns a boolean result indicating whether the database is reachable and healthy. Implements error handling for HTTP request failures.

Returns
bool True if the database health check succeeds with an HTTP 200 response, false otherwise.

Definition at line 61 of file HttpUtils.php.

◆ getGuzzleClient()

static Fossology\Lib\Util\HttpUtils::getGuzzleClient ( array  $SysConf,
string  $baseUri,
string  $token = "" 
)
static

Create a preconfigured Guzzle Client.

Parameters
array$SysConfSysConf array
string$baseUriBase URI of the client
string$tokenAuthentication token. Leave empty if not needed.
Returns
Client Guzzle Client configured with proxy

Definition at line 24 of file HttpUtils.php.


The documentation for this class was generated from the following file: