app/Providers/CurrencyExchangeService/AbstractCurrencyExchangeService.php
/**
     * Can be used to see if end point is correct
     * @param string $endPoint
     *
     * @return bool
     * @throws \GuzzleHttp\Exception\GuzzleException
     */
Can be used to see if end point is correct
@param string $endPoint


Can be used to see if end point is correct @param string $endPoint
public static function testEndPoint(string $endPoint): bool
    {
        try {
            $client   = new \GuzzleHttp\Client();
            $response = $client->request('GET', $endPoint);
            if ($response->getStatusCode() !== 200 &&
                $response->getHeaderLine('content-type') !== 'text/xml; charset=UTF-8') {
                return false;
            }
            return true;
        } catch (\Exception $exception) {
            return false;
        }
    }
public static function testEndPoint ( string $ endPoint ) : bool { try { $ client = new \ GuzzleHttp \ Client ( ) ; $ response = $ client -> request ( 'GET' , $ endPoint ) ; if ( $ response -> getStatusCode ( ) !== 200 && $ response -> getHeaderLine ( 'content-type' ) !== 'text/xml; charset=UTF-8' ) { return false ; } return true ; } catch ( \ Exception $ exception ) { return false ; } }
Can be used to see if end point is correct
 @param string $endPoint
Can be used to see if end point is correct @param string $endPoint