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

Method Close

Ghttp/response.go:39–56  ·  view source on GitHub ↗

Close 关闭请求与body

()

Source from the content-addressed store, hash-verified

37
38// Close 关闭请求与body
39func (h *Http) Close() *Http {
40 defer func() {
41 if err := recover(); err != nil {
42 log.Println(err)
43 }
44 }()
45 if h.HttpResponse != nil {
46 //log.Println("CLose(): ", h.HttpResponse.Body)
47 //h.readAll()
48 h.readNull()
49 h.HttpResponse = nil
50 }
51
52 if h.CtxCancel != nil {
53 h.CtxCancel()
54 }
55 return h
56}
57
58// GetRespHead 获取返回头
59func (h *Http) GetRespHead(key string) string {

Callers 13

IPinfoFunction · 0.95
ServerWaitFunction · 0.45
UnZipFunction · 0.45
GetFunction · 0.45
PostFunction · 0.45
readAllMethod · 0.45
SaveToFileMethod · 0.45
TestPstFunction · 0.45
TestManyReqFunction · 0.45
PingHostFunction · 0.45
TcpPortStatusFunction · 0.45
SqlLoginFunction · 0.45

Calls 1

readNullMethod · 0.95

Tested by 2

TestPstFunction · 0.36
TestManyReqFunction · 0.36