Пример #1
0
 /**
  * @param $httpMethod
  * @param $url
  * @param $blueprint
  * @param array $options
  *
  * @return array
  * @throws \GuzzleHttp\Exception\GuzzleException
  */
 protected function request($httpMethod, $url, $blueprint, $options = [])
 {
     $url = Uri::resolve($this->getBaseUrl(), $url);
     $this->currentMethod = new ApistMethod($this->getGuzzle(), $url, $blueprint);
     $this->lastMethod = $this->currentMethod;
     $this->currentMethod->setMethod($httpMethod);
     $result = $this->currentMethod->get($options);
     $this->currentMethod = null;
     return $result;
 }
Пример #2
0
 /**
  * @param $httpMethod
  * @param $url
  * @param $blueprint
  * @param array $options
  * @return array
  */
 protected function request($httpMethod, $url, $blueprint, $options = [])
 {
     $this->currentMethod = new ApistMethod($this, $url, $blueprint);
     $this->lastMethod = $this->currentMethod;
     $this->currentMethod->setMethod($httpMethod);
     $result = $this->currentMethod->get($options);
     $this->currentMethod = null;
     return $result;
 }