MCPcopy Index your code
hub / github.com/ContentSquare/chproxy / getQuerySnippet

Function getQuerySnippet

utils.go:69–78  ·  view source on GitHub ↗

getQuerySnippet returns query snippet. getQuerySnippet must be called only for error reporting.

(req *http.Request)

Source from the content-addressed store, hash-verified

67//
68// getQuerySnippet must be called only for error reporting.
69func getQuerySnippet(req *http.Request) string {
70 query := req.URL.Query().Get("query")
71 body := getQuerySnippetFromBody(req)
72
73 if len(query) != 0 && len(body) != 0 {
74 query += "\n"
75 }
76
77 return query + body
78}
79
80func hash(s string) uint32 {
81 h := fnv.New32a()

Callers 9

ServeHTTPMethod · 0.85
executeWithRetryFunction · 0.85
proxyRequestMethod · 0.85
TestGetQuerySnippetGETFunction · 0.85
TestGetQuerySnippetPOSTFunction · 0.85
TestDecompressionFunction · 0.85

Calls 2

getQuerySnippetFromBodyFunction · 0.85
GetMethod · 0.65

Tested by 6

TestGetQuerySnippetGETFunction · 0.68
TestGetQuerySnippetPOSTFunction · 0.68
TestDecompressionFunction · 0.68