MCPcopy Create free account
hub / github.com/cloudflare/cfssl / cleverHandle

Function cleverHandle

api/api_test.go:30–43  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

28}
29
30func cleverHandle(w http.ResponseWriter, r *http.Request) error {
31 _, matched, err := ProcessRequestFirstMatchOf(r, [][]string{
32 {"compliment"},
33 {"critique"},
34 })
35 if err != nil {
36 return err
37 }
38 if matched[0] == "critique" {
39 return SendResponse(w, deny)
40 }
41
42 return SendResponse(w, ty)
43}
44
45func post(t *testing.T, obj map[string]interface{}, ts *httptest.Server) (resp *http.Response, body []byte) {
46 blob, err := json.Marshal(obj)

Callers

nothing calls this directly

Calls 2

SendResponseFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…