//WriteRawHead writes a head struct into a ResponseWriter
181575
func WriteRawHead(c http.ResponseWriter, h *Head) {
	c.WriteHeader(h.Status)
	//copy over the headers
	for k, v := range h.Headers {
		for _, vs := range v {
			c.Header().Add(k, vs)
		}
	}

	//write the Content-Type if not a empty string, we do it down here to preserve
	//the given value incase there was an over-write in the headers provided
	//TODO: decide wether to use .Add() or .Set()

	if h.Content != "" {
		c.Header().Add("Content-Type", h.Content)
	}
}
853877
func (r *Route) Head(handler http.Handler) *Route {
	r.handlers[http.MethodHead] = handler
	return r
}
760155
func (d *Doer) Head(url string) (*http.Response, error) {
	req, err := d.newRequest(http.MethodHead, url, nil)
	if err != nil {
		return nil, err
	}

	return d.do(req, nil)
}
240272
func (r *Router) HEAD(path string, handlers ...HandlerFunc) {
	r.Handle("HEAD", path, handlers)
}
1211298
func (r *recordResponseWriter) WriteHeader(i int) {
	r.statusCode = i
	if !r.headersLogged {
		writeHeaders(&r.headers, i, r.ResponseWriter.Header())
		r.headersLogged = true
	}
	r.ResponseWriter.WriteHeader(i)
}
741220
func (c *Client) Head(url string) (*Response, error) {
	req, err := c.NewRequest("HEAD", url, nil)
	if err != nil {
		return nil, err
	}

	response, err := c.Do(req)
	if err != nil {
		return nil, err
	}

	return response, nil
}
133824
func (b *SystemBackend) handleRawWrite(ctx context.Context, req *logical.Request, data *framework.FieldData) (*logical.Response, error) {
	path := data.Get("path").(string)

	// Prevent access of protected paths
	for _, p := range protectedPaths {
		if strings.HasPrefix(path, p) {
			err := fmt.Sprintf("cannot write '%s'", path)
			return logical.ErrorResponse(err), logical.ErrInvalidRequest
		}
	}

	value := data.Get("value").(string)
	entry := &logical.StorageEntry{
		Key:   path,
		Value: []byte(value),
	}
	if err := b.Core.barrier.Put(ctx, entry); err != nil {
		return logical.ErrorResponse(err.Error()), logical.ErrInvalidRequest
	}
	return nil, nil
}
259523
func (w *Writer) WriteRaw(data []byte) {
	w.b = append(w.b, data...)
}
190763
func (b *BaseQueryBuilder) WriteHead(buffer *bytes.Buffer) {
	buffer.WriteString(b.head)
}
227795
func (r *ResponseRecorder) WriteHeader(status int) {
	r.status = status
	r.ResponseWriterWrapper.WriteHeader(status)
}
681031
func (m *scopedManager) WriteHeader(code int) {
	if m.wroteHeader {
		return
	}
	m.MustSaveAll()
	m.wroteHeader = true
	m.ResponseWriter.WriteHeader(code)
}
118188
func (w *writer) WriteHeader(key, value string) error {
	if w.phase != header {
		return &phaseError{header, w.phase}
	}
	_, err := fmt.Fprintf(w, "%s: %s\r\n", key, value)
	return err
}
618244
func (writer *Writer) WriteHeader() error {
	if !writer.Resource.Config.WithoutHeader {
		writer.currentRow++
		for key, meta := range writer.metas {
			writer.Writer.SetCellValue(writer.sheetName, toAxis(key, writer.currentRow), meta.Header)
		}
	}
	return nil
}
1219909
func (h *Handler) WriteHeader(s int) {
	h.ResponseWriter.WriteHeader(s)
	h.responseData.status = s
}
947568
func (r *Router) Head(pattern string, handlers ...Middleware) *Router {
	return r.Handle(http.MethodHead, pattern, handlers...)
}
927213
func (r *ResponseRecorder) WriteHeader(status int) {
	r.status = status
	r.ResponseWriter.WriteHeader(status)
}
1077221
func (r *Request) Head(url string) (*Response, error) {
	return r.Execute(MethodHead, url)
}