MCPcopy Index your code
hub / github.com/keploy/keploy / GetReqMeta

Function GetReqMeta

utils/utils.go:170–181  ·  view source on GitHub ↗

GetReqMeta returns the metadata of the request

(req *http.Request)

Source from the content-addressed store, hash-verified

168
169// GetReqMeta returns the metadata of the request
170func GetReqMeta(req *http.Request) map[string]string {
171 reqMeta := map[string]string{}
172 if req != nil {
173 // get request metadata
174 reqMeta = map[string]string{
175 "method": req.Method,
176 "url": req.URL.String(),
177 "host": req.Host,
178 }
179 }
180 return reqMeta
181}
182
183func IsPassThrough(logger *zap.Logger, req *http.Request, destPort uint, opts models.OutgoingOptions) bool {
184 passThrough := false

Callers 5

parseFinalHTTPMethod · 0.92
buildHTTPMockMethod · 0.92
decodeHTTPMethod · 0.92
CaptureFunction · 0.92
IsPassThroughFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected