Add Head

@access public
@param  $url
@param  $data

@return object
336564
public function addHead($url, $data = array())
    {
        if (is_array($url)) {
            $data = $url;
            $url = $this->baseUrl;
        }
        $curl = new Curl();
        $curl->setURL($url, $data);
        $curl->setOpt(CURLOPT_CUSTOMREQUEST, 'HEAD');
        $curl->setOpt(CURLOPT_NOBODY, true);
        $this->addHandle($curl);
        return $curl;
    }
652819
public static function head($url, $headers = array(), $options = array()) {
		return self::request($url, $headers, null, self::HEAD, $options);
	}
1143196
public function addHead(string $uri, string $handler, string $name = null)
    {
        $this->addRoute("HEAD", $uri, $handler, $name);
    }
392768
public function head($url, $options = [], $body = null)
    {
        return $this->httpRequest('HEAD', $this->createUrl($url, $options), $body);
    }
579971
public static function post($url, $data = [], $options = [])
    {
        $options['data'] = $data;
        return self::doRequest('post', $url, $options);
    }
806271
public function get($url, $data) {
        curl_setopt($this->_ch, CURLOPT_CUSTOMREQUEST, 'GET');
        curl_setopt($this->_ch, CURLOPT_URL, sprintf( "%s?%s", $url, http_build_query($data, '', '&', PHP_QUERY_RFC3986)));
        curl_setopt($this->_ch, CURLOPT_HTTPHEADER, array("Accept:application/json", "Content-Type: application/json"));

        return $this->_exec();
    }
446822
protected function post(string $url, array $data = []): string
    {
        $ch = \curl_init($url);
        \curl_setopt($ch, CURLOPT_HTTPHEADER, $this->headers());
        \curl_setopt($ch, CURLOPT_POST, true);
        \curl_setopt($ch, CURLOPT_COOKIE, $this->parseCookies($this->cookies));
        \curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        \curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
        \curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

        $before_curl_time = time();
        if ($this->allowRawResponceDebug)
        {
            \is_callable($this->debugCallback) && \call_user_func($this->debugCallback, [
                'before_curl' => $before_curl_time,
            ]);
        }

        $result = \curl_exec($ch);
        $error = \curl_error($ch);
        $errno = \curl_errno($ch);
        \curl_close($ch);

        if ($this->allowRawResponceDebug)
        {
            \is_callable($this->debugCallback) && \call_user_func($this->debugCallback, [
                'raw_responce' => $result,
                'error' => $error,
                'errorno' => $errno,
                'curl_delta' => time() - $before_curl_time,
            ]);
        }

        return $result;
    }
365216
public function head($uri, $storage, $name = null){
        return $this->add($uri, $storage, $name, 'HEAD');
    }
168857
public function put($url, $data, array $headers = array())
    {
        curl_setopt($this->handle, CURLOPT_CUSTOMREQUEST, 'PUT');

        $fields = is_array($data) ? http_build_query($data) : $data;
        curl_setopt($this->handle, CURLOPT_POSTFIELDS, $fields);

        $headers = array_replace($headers, ['Content-Length' => strlen($fields)]);
        return $this->execute($url, $headers);
    }
760900
public function put($url, $data, array $customHeaders = [])
    {
        return $this->handleFailover(function() use ($url, $data, $customHeaders) {
            $response = $this->executeRequest(HttpHelper::METHOD_PUT, $url, $data, $customHeaders);

            return $this->parseResponse($response);
        });
    }
237691
public function put($url, $data = null, $headers = [], $options = [])
    {
        return $this->createRequestShortcut('PUT', $url, $data, $headers, $options);
    }
1231064
public function head($url, array $data = [], array $options = [])
    {
        $options = $this->_mergeOptions($options);
        $url = $this->buildUrl($url, $data, $options);

        return $this->_doRequest(Request::METHOD_HEAD, $url, '', $options);
    }
433678
public function push($title, $url = null, array $data = [])
    {
        $this->breadcrumbs->addOne($title, $url, $data);

        return $this;
    }
44254
public function put($url, array $data = [], array $headers = [])
    {
        $this->unsetOptions([CURLOPT_HTTPGET, CURLOPT_POST]);

        $this->setOption(CURLOPT_CUSTOMREQUEST, 'PUT');

        return $this->send($url, $data, $headers);
    }
123158
public function put(String $url = NULL, $data = NULL)
    {
        return $this->_customRequest($url, URL::buildQuery($this->data ?? $data), __FUNCTION__);
    }
1247033
public function patch($url, $data = array())
    {
        if (is_array($url)) {
            $data = $url;
            $url = $this->baseUrl;
        }

        if (is_array($data) && empty($data)) {
            $this->removeHeader('Content-Length');
        }

        $this->setUrl($url);
        $this->setOpt(CURLOPT_CUSTOMREQUEST, 'PATCH');
        $this->setOpt(CURLOPT_POSTFIELDS, $this->buildPostData($data));
        return $this->exec();
    }
1105251
public function head($uri, $handler, $middlewares = array())
    {
        return $this->add($this->route('HEAD', $uri, $handler, $middlewares));
    }