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

Method Post

Ghttp/post.go:14–28  ·  view source on GitHub ↗

POST 方法

(urls string, params interface{})

Source from the content-addressed store, hash-verified

12
13// POST 方法
14func (h *Http) Post(urls string, params interface{}) *Http {
15 h.New("POST", urls)
16 if h.err != nil {
17 return h
18 }
19 switch params.(type) {
20 case string:
21 h.SetPostString(params.(string))
22 case map[string]interface{}:
23 h.SetPostJson(params.(map[string]interface{}))
24 case url.Values:
25 h.SetPostValues(params.(url.Values))
26 }
27 return nil
28}
29
30//urlpkg.Values 格式的参数
31func (h *Http) SetPostValues(values url.Values) {

Callers 2

PostFunction · 0.80
TestPstFunction · 0.80

Calls 4

NewMethod · 0.95
SetPostStringMethod · 0.95
SetPostJsonMethod · 0.95
SetPostValuesMethod · 0.95

Tested by 1

TestPstFunction · 0.64