src/Providers/AbstractProvider.php
protected function sendRequest(string $hostname, array $params): string
    {
        $url = $hostname . "?" . http_build_query($params);

        $response = $this->getClient()->request("GET", $url);

        if ($response->getStatusCode() != "200") {
            throw new ProviderException("Failed to call the external text-to-speech service");
        }

        return $response->getBody();
    }
protected function sendRequest(string $hostname, array $params): string
    {
        $url = $hostname . "?" . http_build_query($params);

        $response = $this->getClient()->request("GET", $url);

        if ($response->getStatusCode() != "200") {
            throw new ProviderException("Failed to call the external text-to-speech service");
        }

        return $response->getBody();
    }
protected function sendRequest ( string $ hostname , array $ params ) : string { $ url = $ hostname . "?" . http_build_query ( $ params ) ; $ response = $ this -> getClient ( ) -> request ( "GET" , $ url ) ; if ( $ response -> getStatusCode ( ) != "200" ) { throw new ProviderException ( "Failed to call the external text-to-speech service" ) ; } return $ response -> getBody ( ) ; }
Send a http request.

@param string $hostname The hostname to send the request to
@param string[] $params The parameters of the request

@return string The response body
Send a http request .