MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / Handle

Method Handle

internal/ws/handler.go:40–42  ·  view source on GitHub ↗

Handle is the HTTP handler for WebSocket upgrade requests. Route: GET /v1/agents/{email}/ws — authenticated by `Authorization: Bearer `. Handle reads the agent email from the gorilla/mux route var.

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

Source from the content-addressed store, hash-verified

38// Route: GET /v1/agents/{email}/ws — authenticated by `Authorization: Bearer <api_key>`.
39// Handle reads the agent email from the gorilla/mux route var.
40func (h *Handler) Handle(w http.ResponseWriter, r *http.Request) {
41 h.serve(w, r, mux.Vars(r)["email"])
42}
43
44// ServeWithEmail handles the WebSocket upgrade for an explicitly-provided
45// agent email, so non-mux routers (chi at /v1/agents/{address}/ws) can host

Callers 1

muxMethod · 0.80

Calls 1

serveMethod · 0.95

Tested by

no test coverage detected