MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / AppHandleMessage

Method AppHandleMessage

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

Source from the content-addressed store, hash-verified

76}
77
78func (i *imlMcpController) AppHandleMessage(ctx *gin.Context) {
79 appId := ctx.Param("app")
80 if appId == "" {
81 ctx.AbortWithStatusJSON(403, gin.H{"code": -1, "msg": "invalid app id", "success": "fail"})
82 return
83 }
84 ctx.Request.URL.Path = fmt.Sprintf("/openapi/v1/%s/message", mcp_server.GlobalBasePath)
85 //ctx.Request = ctx.Request.WithContext(utils.SetLabel(ctx.Request.Context(), "app", appId))
86 i.handleMessage(ctx, i.openSseServer)
87}
88
89func (i *imlMcpController) AppHandleStreamHTTP(ctx *gin.Context) {
90 apikey := ctx.Request.Header.Get("Authorization")

Callers

nothing calls this directly

Calls 1

handleMessageMethod · 0.95

Tested by

no test coverage detected