MCPcopy Index your code
hub / github.com/SummerSec/SpringExploit / Send

Function Send

cmd/commons/utils/httpclient.go:47–76  ·  view source on GitHub ↗
(hashmap map[string]interface{})

Source from the content-addressed store, hash-verified

45}
46
47func Send(hashmap map[string]interface{}) (resp *req.Response) {
48 log.Debugln("send requesting")
49 method := hashmap["method"].(string)
50 url := hashmap["url"].(string)
51 proxy := hashmap["proxy"].(string)
52 retry := hashmap["retry"].(int)
53 timeout := hashmap["timeout"].(int)
54 mode := hashmap["mode"].(int)
55 headers := hashmap["headers"].(map[string]string)
56 body := hashmap["body"]
57 h1 := hashmap["h1"].(bool)
58 redirect := hashmap["redirect"].(bool)
59
60 client := InIt(mode, timeout, proxy, retry, h1, redirect)
61
62 //reqt := client.R().EnableDump()
63 reqt := client.R()
64 reqs := SetRequest(reqt, headers, body.(string))
65 resp, errs := reqs.Send(method, url)
66 log.Debugln("send request success", resp.Dump())
67 if resp == nil || errs != nil {
68 log.Debug("requesting error: " + errs.Error())
69 if resp == nil {
70 log.Info("resp is nil")
71 }
72 return resp
73 }
74
75 return resp
76}

Callers 10

SendPocMethod · 0.92
SendPocMethod · 0.92
CheckExpMethod · 0.92
SendPocMethod · 0.92
SendPocMethod · 0.92
SendPocMethod · 0.92
SendPocMethod · 0.92
SendPocMethod · 0.92
SendPocMethod · 0.92
SendPocMethod · 0.92

Calls 2

InItFunction · 0.85
SetRequestFunction · 0.85

Tested by

no test coverage detected