github.com/HXSecurity/DongTai-agent-go@v0.4.2/core/base/httpClientDo/replacement.go (about) 1 package httpClientDo 2 3 import ( 4 "github.com/HXSecurity/DongTai-agent-go/model/request" 5 "net/http" 6 "reflect" 7 ) 8 9 func Do(c *http.Client, req *http.Request) (*http.Response, error) { 10 res, err := DoR(c, req) 11 var u uintptr 12 value := reflect.ValueOf(req) 13 u = value.Pointer() 14 request.FmtHookPool(request.PoolReq{ 15 Args: request.Collect(c, req), 16 Reqs: request.Collect(res, err), 17 NeedHook: request.Collect(u), 18 Source: false, 19 OriginClassName: "http.(*Client)", 20 MethodName: "Do", 21 ClassName: "http.(*Client)", 22 }) 23 return res, err 24 } 25 26 func DoR(c *http.Client, req *http.Request) (*http.Response, error) { 27 return nil, nil 28 }