Exemplo n.º 1
0
 /**
  * @param array $params
  *   An associative array with pairs of query param name and it value.
  *
  * @return self
  */
 public function get(array $params = [])
 {
     if (isset($this->auth)) {
         $this->auth->setRequestMethod(__FUNCTION__);
         $this->auth->setRequestFields($params);
     }
     if (!empty($params)) {
         $this->options[CURLOPT_URL] .= '?' . http_build_query($params);
     }
     $this->options[CURLOPT_HTTPGET] = true;
     return $this;
 }