Example #1
0
 /**
  * Выполнение запроса
  * @return \Httpful\associative|string
  *
  * @throws \Httpful\Exception\ConnectionErrorException
  */
 public function send()
 {
     if ($this->userAgent !== null) {
         $this->request->addHeader('User-Agent', $this->userAgent);
     }
     if ($this->x_real_ip !== null) {
         $this->request->addHeader('X-Real-IP', $this->x_real_ip);
     }
     return $this->request->timeout(self::TIMEOUT)->send();
 }