original_string: private function _request(string $method, array $params = [], array $optional = [])
      {
          $url = $this->_parseUrl($method, $params + $optional);
          if ($url === false) {
              throw new InvalidRequestException('Could not parse URL!');
          }
  
          $req = Request::get($url);
          $req->strict_ssl = $this->_verifySsl;
          $req->max_redirects = $this->_maxRedirects;
          $req->setConnectionTimeout(5);
  
          try {
              $buffer = $req->send();
          } catch (ConnectionErrorException $e) {
              throw new InvalidRequestException($e->getMessage(), $e->getCode(), $e);
          }
  
          if (!empty($buffer)) {
              try {
                  return $this->_finishResponse($this->_parseResponse($buffer), $method, $params + $optional);
              } catch (InvalidResponseException $e) {
                  throw new InvalidRequestException($e->getMessage(), $e->getCode(), $e);
              }
          }
  
          throw new InvalidRequestException('Empty response!');
      }
code: private function _request(string $method, array $params = [], array $optional = [])
      {
          $url = $this->_parseUrl($method, $params + $optional);
          if ($url === false) {
              throw new InvalidRequestException('Could not parse URL!');
          }
  
          $req = Request::get($url);
          $req->strict_ssl = $this->_verifySsl;
          $req->max_redirects = $this->_maxRedirects;
          $req->setConnectionTimeout(5);
  
          try {
              $buffer = $req->send();
          } catch (ConnectionErrorException $e) {
              throw new InvalidRequestException($e->getMessage(), $e->getCode(), $e);
          }
  
          if (!empty($buffer)) {
              try {
                  return $this->_finishResponse($this->_parseResponse($buffer), $method, $params + $optional);
              } catch (InvalidResponseException $e) {
                  throw new InvalidRequestException($e->getMessage(), $e->getCode(), $e);
              }
          }
  
          throw new InvalidRequestException('Empty response!');
      }
code_tokens: private function _request ( string $ method , array $ params = [ ] , array $ optional = [ ] ) { $ url = $ this -> _parseUrl ( $ method , $ params + $ optional ) ; if ( $ url === false ) { throw new InvalidRequestException ( 'Could not parse URL!' ) ; } $ req = Request :: get ( $ url ) ; $ req -> strict_ssl = $ this -> _verifySsl ; $ req -> max_redirects = $ this -> _maxRedirects ; $ req -> setConnectionTimeout ( 5 ) ; try { $ buffer = $ req -> send ( ) ; } catch ( ConnectionErrorException $ e ) { throw new InvalidRequestException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } if ( ! empty ( $ buffer ) ) { try { return $ this -> _finishResponse ( $ this -> _parseResponse ( $ buffer ) , $ method , $ params + $ optional ) ; } catch ( InvalidResponseException $ e ) { throw new InvalidRequestException ( $ e -> getMessage ( ) , $ e -> getCode ( ) , $ e ) ; } } throw new InvalidRequestException ( 'Empty response!' ) ; }
docstring: Make API request
  
  @param string $method
  @param array $params
  @param array $optional
  @return bool|object
  @throws InvalidRequestException
docstring_tokens: Make API request