// Head registers a route prefix and will invoke the Handler when the route
// matches the prefix and the request METHOD is HEAD
492031
func (w *Weavebox) Head(route string, h Handler) {
	w.add("HEAD", route, h)
}
490699
func (r *RequestConfig) Header(name, value string) *RequestConfig {
	r.HeaderMap.Add(name, value)
	return r
}
312355
func (q *UniqueQueue) Head() (TimedValue, bool) {
	q.lock.Lock()
	defer q.lock.Unlock()
	if len(q.queue) == 0 {
		return TimedValue{}, false
	}
	result := q.queue[0]
	return *result, true
}
783472
func (m *MockHTTPClient) Head(arg0 string) (*http.Response, error) {
	ret := m.ctrl.Call(m, "Head", arg0)
	ret0, _ := ret[0].(*http.Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
544728
func (r *Route) Handler(h Handler) *Route {
	r.route.Handler(r.handler(h))
	return r
}
632360
func (this *HttpClient) Head(url string) (*Response, error) {
	return this.Do("HEAD", url, nil, nil)
}
749694
func (c *Collector) Head(URL string) error {
	return c.scrape(URL, "HEAD", 1, nil, nil, nil, false)
}
825859
func (c *AppPatchCall) Header() http.Header {
	if c.header_ == nil {
		c.header_ = make(http.Header)
	}
	return c.header_
}
137206
func Head(pattern web.PatternType, handler web.HandlerType) {
	DefaultMux.Head(pattern, handler)
}
517277
func (c *Context) Header(name string) string {
	return c.request.Header.Get(name)
}
1093384
func (r *SubRouter) HEAD(route string, handler interface{}) *SubRouter {
	route = r.prefixedRoute(route)
	if r.parent != nil {
		r.parent.handleReg(MethodHEAD, route, handler, r.prefixes)
	}

	return r
}
588377
func (r *SearchRequest) header() interface{} {
	h := make(map[string]interface{})
	if r.searchType != "" {
		h["search_type"] = r.searchType
	}

	switch len(r.indices) {
	case 0:
	case 1:
		h["index"] = r.indices[0]
	default:
		h["indices"] = r.indices
	}

	switch len(r.types) {
	case 0:
	case 1:
		h["type"] = r.types[0]
	default:
		h["types"] = r.types
	}

	if r.routing != nil && *r.routing != "" {
		h["routing"] = *r.routing
	}
	if r.preference != nil && *r.preference != "" {
		h["preference"] = *r.preference
	}
	if r.requestCache != nil {
		h["request_cache"] = *r.requestCache
	}
	if r.ignoreUnavailable != nil {
		h["ignore_unavailable"] = *r.ignoreUnavailable
	}
	if r.allowNoIndices != nil {
		h["allow_no_indices"] = *r.allowNoIndices
	}
	if r.expandWildcards != "" {
		h["expand_wildcards"] = r.expandWildcards
	}
	if v := r.allowPartialSearchResults; v != nil {
		h["allow_partial_search_results"] = *v
	}
	if r.scroll != "" {
		h["scroll"] = r.scroll
	}

	return h
}
445003
func (r *Repository) Head() (*plumbing.Reference, error) {
	return storer.ResolveReference(r.Storer, plumbing.HEAD)
}
463196
func (s *Sling) Head(pathURL string) *Sling {
	s.method = "HEAD"
	return s.Path(pathURL)
}
271035
func (pq *PQueue) Head() (interface{}, int) {
	pq.RLock()
	defer pq.RUnlock()

	if pq.size() < 1 {
		return nil, 0
	}

	headValue := pq.items[1].value
	headPriority := pq.items[1].priority

	return headValue, headPriority
}
947568
func (r *Router) Head(pattern string, handlers ...Middleware) *Router {
	return r.Handle(http.MethodHead, pattern, handlers...)
}
352710
func HeaderHandler(headers ...string) func(*http.Request) map[string]interface{} {
	return func(req *http.Request) map[string]interface{} {
		result := map[string]interface{}{}
		for _, header := range headers {
			if val := req.Header.Get(header); val != "" {
				result[header] = val
			}
		}
		return result
	}
}