MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / GlobalMCPHandle

Method GlobalMCPHandle

controller/mcp/iml.go:161–170  ·  view source on GitHub ↗
(ctx *gin.Context)

Source from the content-addressed store, hash-verified

159}
160
161func (i *imlMcpController) GlobalMCPHandle(ctx *gin.Context) {
162 cfg := i.settingModule.Get(ctx)
163 req := ctx.Request.WithContext(utils.SetGatewayInvoke(ctx.Request.Context(), cfg.InvokeAddress))
164 locale := utils.I18n(ctx)
165 if v, ok := i.sseServers[locale]; ok {
166 v.ServeHTTP(ctx.Writer, req)
167 return
168 }
169 i.sseServers[languageEnUs].ServeHTTP(ctx.Writer, req)
170}
171
172func (i *imlMcpController) GlobalHandleSSE(ctx *gin.Context) {
173 apikey := ctx.Request.URL.Query().Get("apikey")

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
ServeHTTPMethod · 0.45

Tested by

no test coverage detected