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