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

Method GlobalHandleStreamHTTP

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

Source from the content-addressed store, hash-verified

201}
202
203func (i *imlMcpController) GlobalHandleStreamHTTP(ctx *gin.Context) {
204 apikey := ctx.Request.Header.Get("Authorization")
205 apikey = strings.TrimPrefix(apikey, "Bearer ")
206 cfg := i.settingModule.Get(ctx)
207 req := ctx.Request.WithContext(utils.SetGatewayInvoke(ctx.Request.Context(), cfg.InvokeAddress))
208 req = req.WithContext(utils.SetLabel(req.Context(), "apikey", apikey))
209 i.openStreamableServer.ServeHTTP(ctx.Writer, req)
210}
211
212func (i *imlMcpController) MCPHandle(ctx *gin.Context) {
213 cfg := i.settingModule.Get(ctx)

Callers

nothing calls this directly

Calls 2

GetMethod · 0.65
ServeHTTPMethod · 0.45

Tested by

no test coverage detected