MCPcopy Index your code
hub / github.com/code-scan/Goal / SetPostString

Method SetPostString

Ghttp/post.go:51–55  ·  view source on GitHub ↗

字符串格式的参数 a=1&b=2

(values string)

Source from the content-addressed store, hash-verified

49
50// 字符串格式的参数 a=1&b=2
51func (h *Http) SetPostString(values string) *Http {
52 h.HttpBody = strings.NewReader(values)
53 h.setParams()
54 return h
55}
56func (h *Http) setParams() *Http {
57 if h.HttpRequest != nil && h.HttpBody != nil {
58 h.HttpRequest.Body = ioutil.NopCloser(h.HttpBody)

Callers 2

PostMethod · 0.95
sendMethod · 0.80

Calls 1

setParamsMethod · 0.95

Tested by

no test coverage detected