Habari\RemoteRequest::execute PHP Метод

execute() публичный Метод

On success, returns true and populates the response_body and response_headers fields. On failure, throws Exception.
public execute ( )
    public function execute()
    {
        $this->prepare();
        $result = $this->processor->execute($this->method, $this->url, $this->headers, $this->body, $this->config);
        if ($result) {
            // XXX exceptions?
            $this->response_headers = $this->processor->get_response_headers();
            $this->response_body = $this->processor->get_response_body();
            $this->executed = true;
            return true;
        } else {
            // processor->execute should throw an Exception which would bubble up
            $this->executed = false;
            return $result;
        }
    }