MCPcopy Create free account
hub / github.com/EpochCloud/quick / validate

Function validate

engine/engine.go:47–55  ·  view source on GitHub ↗
(w http.ResponseWriter, ctx *http.Request)

Source from the content-addressed store, hash-verified

45}
46
47func validate(w http.ResponseWriter, ctx *http.Request) (interface{}, error) {
48 service, ok := config.Srv.Service.Get(ctx.URL.Path)
49 if !ok {
50 errResult.SendErrorResponse(w, config.ErrorMethodFailed)
51 config.Log.Error("request route err", ctx.URL.Path)
52 return nil, errors.New("request route err")
53 }
54 return service, nil
55}
56
57func getHeader(ctx http.ResponseWriter, w *http.Response) {
58 for k, _ := range ctx.Header() {

Callers 1

EngineFunction · 0.85

Calls 2

SendErrorResponseMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected