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

Method Execute

Ghttp/response.go:15–36  ·  view source on GitHub ↗

Execute 发送请求

()

Source from the content-addressed store, hash-verified

13
14// Execute 发送请求
15func (h *Http) Execute() *Http {
16 defer func() {
17 if err := recover(); err != nil {
18 log.Println("recover: ", err)
19 }
20 }()
21 if h.err != nil {
22 log.Println("[!] Pre Http.Execute(): ", h.err)
23 return nil
24 }
25
26 //fmt.Printf("HttpTransport: %p \n", h.HttpTransport)
27 var err error
28 // h.HttpClient.Transport = h.HttpTransport
29 h.HttpResponse, err = h.HttpClient.Do(h.HttpRequest)
30 if err != nil {
31 log.Println("[!] Http Execute Error : ", err)
32 h.err = err
33 return h
34 }
35 return h
36}
37
38// Close 关闭请求与body
39func (h *Http) Close() *Http {

Callers 15

TestHeadFunction · 0.95
IPinfoFunction · 0.95
GetFunction · 0.80
PostFunction · 0.80
TestCookieFunction · 0.80
TestPstFunction · 0.80
TestManyReqFunction · 0.80
TestNewReqFunction · 0.80
GetResultMethod · 0.80
GetResultMethod · 0.80
sendMethod · 0.80
GetResultMethod · 0.80

Calls

no outgoing calls

Tested by 5

TestHeadFunction · 0.76
TestCookieFunction · 0.64
TestPstFunction · 0.64
TestManyReqFunction · 0.64
TestNewReqFunction · 0.64