public function get(
        string $url,
        string $method,
        array $query = [],
        array $body = [],
        array $server = []
    ): array {
        $method = strtolower($method);
        $requestParts = $this->buildRequestParts(
            $url,
            $query,
            $body,
            $server
        );

        return $this->tryRequest(function () use ($method, $requestParts) {
            return $this
                ->httpAdapter
                ->getByRequestParts(
                    $this->host,
                    $method,
                    $requestParts
                );
        }, $this
            ->retryMap
            ->getRetry(
                $url,
                $method
            )
        );
    }
public function get(
        string $url,
        string $method,
        array $query = [],
        array $body = [],
        array $server = []
    ): array {
        $method = strtolower($method);
        $requestParts = $this->buildRequestParts(
            $url,
            $query,
            $body,
            $server
        );

        return $this->tryRequest(function () use ($method, $requestParts) {
            return $this
                ->httpAdapter
                ->getByRequestParts(
                    $this->host,
                    $method,
                    $requestParts
                );
        }, $this
            ->retryMap
            ->getRetry(
                $url,
                $method
            )
        );
    }
public function get ( string $ url , string $ method , array $ query = [ ] , array $ body = [ ] , array $ server = [ ] ) : array { $ method = strtolower ( $ method ) ; $ requestParts = $ this -> buildRequestParts ( $ url , $ query , $ body , $ server ) ; return $ this -> tryRequest ( function ( ) use ( $ method , $ requestParts ) { return $ this -> httpAdapter -> getByRequestParts ( $ this -> host , $ method , $ requestParts ) ; } , $ this -> retryMap -> getRetry ( $ url , $ method ) ) ; }
Get a response given some parameters.
Return an array with the status code and the body.

@param string $url
@param string $method
@param array  $query
@param array  $body
@param array  $server

@return array

@throws ConnectionException
Get a response given some parameters . Return an array with the status code and the body .