// DebugHTTPForm helper to print the form url parameters
762978
func DebugHTTPForm(r *http.Request) {
	for k, v := range r.Form {
		logrus.Debugf("Form[%q] = %q\n", k, v)
	}
}
1109227
func (pool *BlockPool) debug() string {
	pool.mtx.Lock()
	defer pool.mtx.Unlock()

	str := ""
	nextHeight := pool.height + pool.requestersLen()
	for h := pool.height; h < nextHeight; h++ {
		if pool.requesters[h] == nil {
			str += fmt.Sprintf("H(%v):X ", h)
		} else {
			str += fmt.Sprintf("H(%v):", h)
			str += fmt.Sprintf("B?(%v) ", pool.requesters[h].block != nil)
		}
	}
	return str
}
489717
func (ba *BasicAuth) DebugString() string {
	return fmt.Sprintf("Username: %v, Password: %v", ba.Username, ba.Password)
}
786811
func (m *MockHTTPClient) PostForm(arg0 string, arg1 url.Values) (*http.Response, error) {
	ret := m.ctrl.Call(m, "PostForm", arg0, arg1)
	ret0, _ := ret[0].(*http.Response)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
1009055
func (me *Logger) Debugf(format string, v ...interface{}) {
	me.printf(Pdebug, format, v...)
}
214422
func (p P) Debugf(format string, v ...interface{}) {
	if !D {
		return
	}
	p.logf(debug, format, v...)
}
98004
func (r Request) PostForm(params map[string]string) (Request, error) {
	return reqForm(r, params, "POST")
}
2068
func reqForm(r Request, params map[string]string, method string) (Request, error) {
	body := &bytes.Buffer{}
	writer := multipart.NewWriter(body)
	for key, val := range params {
		_ = writer.WriteField(key, val)
	}
	defer writer.Close()
	req, err := http.NewRequest(method, r.URI, body)
	req.Header.Add("Content-Type", writer.FormDataContentType())
	if r.Headers != nil {
		for _, header := range r.Headers {
			req.Header.Add(header.Key, header.Value)
		}
	}
	if r.BasicAuth.Username != "" {
		r.Req.SetBasicAuth(r.BasicAuth.Username, r.BasicAuth.Password)
	}
	r.Req = req
	return r, err
}
128228
func (c *Context) PostForm(key string) string {
	value, _ := c.GetPostForm(key)
	return value
}
279791
func PostForm(ctx context.Context, client *http.Client, url string, data url.Values) (*http.Response, error) {
	return Post(ctx, client, url, "application/x-www-form-urlencoded", strings.NewReader(data.Encode()))
}
293167
func (wc *WebhookContext) Form() uurl.Values {
	//todo: bug, RAW() unavailable after ParseForm()
	wc.gin.Request.ParseForm()
	return wc.gin.Request.PostForm
}
1235946
func (c *Context) PostForm(key string, defaultValue ...string) string {
	r := c.Request
	r.ParseMultipartForm(32 << 20)
	if vs := r.PostForm[key]; len(vs) > 0 {
		return vs[0]
	}

	if len(defaultValue) > 0 {
		return defaultValue[0]
	}
	return ""
}
169173
func (l *defaultLogger) Debugf(format string, args ...interface{}) {
	if l.logLevel == LogLevelDebug {
		l.logMessage(format, args...)
	}
}
1097349
func (r *FastHttpRequest) GetForm() (url.Values, error) {
	if !r.FormParsed {
		r.form = url.Values{}
		r.Original.PostArgs().VisitAll(func(key, value []byte) {
			r.query.Set(string(key), string(value))
		})
		r.FormParsed = true
	}
	return r.form, nil
}
838178
func PostMultipartForm(fields []MultipartFormField, uri string) (respBody []byte, err error) {
	bodyBuf := &bytes.Buffer{}
	bodyWriter := multipart.NewWriter(bodyBuf)

	for _, field := range fields {
		if field.IsFile {
			fileWriter, e := bodyWriter.CreateFormFile(field.Fieldname, field.Filename)
			if e != nil {
				err = fmt.Errorf("error writing to buffer , err=%v", e)
				return
			}

			fh, e := os.Open(field.Filename)
			if e != nil {
				err = fmt.Errorf("error opening file , err=%v", e)
				return
			}
			defer fh.Close()

			if _, err = io.Copy(fileWriter, fh); err != nil {
				return
			}
		} else {
			partWriter, e := bodyWriter.CreateFormField(field.Fieldname)
			if e != nil {
				err = e
				return
			}
			valueReader := bytes.NewReader(field.Value)
			if _, err = io.Copy(partWriter, valueReader); err != nil {
				return
			}
		}
	}

	contentType := bodyWriter.FormDataContentType()
	bodyWriter.Close()

	resp, e := http.Post(uri, contentType, bodyBuf)
	if e != nil {
		err = e
		return
	}
	defer resp.Body.Close()
	if resp.StatusCode != http.StatusOK {
		return nil, err
	}
	respBody, err = ioutil.ReadAll(resp.Body)
	return
}
1192492
func (l *DebugLogger) Debugf(format string, v ...interface{}) {
	if l.debug == true {
		l.Output(2, fmt.Sprintf(format, v...))
	}
}
1171051
func Debugf(format string, a ...interface{}) {
	if !debug {
		return
	}
	output("[DEBG]", fmt.Sprintf(format, a...))
}