protected function call($url)
    {
        $scheme = 'https://';
        $host = 'openapi.bol.com';
        $content = '';
        $today = gmdate('D, d F Y H:i:s \G\M\T');
        $contentType =	'application/xml';

        $headers = array(
            'Content-type: ' . $contentType,
            'Host: ' . $host,
            'Content-length: ' . strlen($content),
            'X-OpenAPI-Authorization: ' . $this->getSignature($today, 'GET', $url, $contentType),
            'X-OpenAPI-Date: ' . $today,
        );
        if(!is_null($this->sessionId)) {
            $headers[] = 'X-OpenAPI-Session-ID: ' . $this->sessionId;
        }

        $response = $this->browser->get($scheme.$host.$url, $headers);
        if ($response->getStatusCode() === 503) {
            throw new BolException('Service Temporarily Unavailable', 503);
        }

        return $response;
    }
protected function call($url)
    {
        $scheme = 'https://';
        $host = 'openapi.bol.com';
        $content = '';
        $today = gmdate('D, d F Y H:i:s \G\M\T');
        $contentType =	'application/xml';

        $headers = array(
            'Content-type: ' . $contentType,
            'Host: ' . $host,
            'Content-length: ' . strlen($content),
            'X-OpenAPI-Authorization: ' . $this->getSignature($today, 'GET', $url, $contentType),
            'X-OpenAPI-Date: ' . $today,
        );
        if(!is_null($this->sessionId)) {
            $headers[] = 'X-OpenAPI-Session-ID: ' . $this->sessionId;
        }

        $response = $this->browser->get($scheme.$host.$url, $headers);
        if ($response->getStatusCode() === 503) {
            throw new BolException('Service Temporarily Unavailable', 503);
        }

        return $response;
    }
protected function call ( $ url ) { $ scheme = 'https://' ; $ host = 'openapi.bol.com' ; $ content = '' ; $ today = gmdate ( 'D, d F Y H:i:s \G\M\T' ) ; $ contentType = 'application/xml' ; $ headers = array ( 'Content-type: ' . $ contentType , 'Host: ' . $ host , 'Content-length: ' . strlen ( $ content ) , 'X-OpenAPI-Authorization: ' . $ this -> getSignature ( $ today , 'GET' , $ url , $ contentType ) , 'X-OpenAPI-Date: ' . $ today , ) ; if ( ! is_null ( $ this -> sessionId ) ) { $ headers [ ] = 'X-OpenAPI-Session-ID: ' . $ this -> sessionId ; } $ response = $ this -> browser -> get ( $ scheme . $ host . $ url , $ headers ) ; if ( $ response -> getStatusCode ( ) === 503 ) { throw new BolException ( 'Service Temporarily Unavailable' , 503 ) ; } return $ response ; }
Prepare headers, compose url and make a call
@param $url
@return \Buzz\Message\Response
@throws \BolOpenApi\Exception
Prepare headers compose url and make a call