/** * @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; }
/** * @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; }