MCPcopy Create free account
hub / github.com/astercloud/aster / ServeHTTP

Method ServeHTTP

pkg/desktop/desktop.go:602–608  ·  view source on GitHub ↗

ServeHTTP implements http.Handler for web-based bridges

(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

600
601// ServeHTTP implements http.Handler for web-based bridges
602func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request) {
603 if wb, ok := a.bridge.(http.Handler); ok {
604 wb.ServeHTTP(w, r)
605 } else {
606 http.Error(w, "Bridge does not support HTTP", http.StatusNotImplemented)
607 }
608}

Callers 15

TestWebBridgeHealthCheckFunction · 0.45
TestCorsMiddlewareFunction · 0.45
corsMiddlewareFunction · 0.45
TestToolHandlersFunction · 0.45
TestMiddlewareHandlersFunction · 0.45
TestTelemetryHandlersFunction · 0.45
TestSystemHandlersFunction · 0.45
TestMCPHandlersFunction · 0.45
TestEvalHandlersFunction · 0.45
TestValidationErrorsFunction · 0.45
TestQueryParametersFunction · 0.45

Calls 1

ErrorMethod · 0.65

Tested by 15

TestWebBridgeHealthCheckFunction · 0.36
TestCorsMiddlewareFunction · 0.36
TestToolHandlersFunction · 0.36
TestMiddlewareHandlersFunction · 0.36
TestTelemetryHandlersFunction · 0.36
TestSystemHandlersFunction · 0.36
TestMCPHandlersFunction · 0.36
TestEvalHandlersFunction · 0.36
TestValidationErrorsFunction · 0.36
TestQueryParametersFunction · 0.36
TestResponseFormatFunction · 0.36