MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / relayRequest

Function relayRequest

controller/relay.go:221–226  ·  view source on GitHub ↗
(c *gin.Context, relayMode int, channel *model.Channel)

Source from the content-addressed store, hash-verified

219}
220
221func relayRequest(c *gin.Context, relayMode int, channel *model.Channel) *types.NewAPIError {
222 addUsedChannel(c, channel.Id)
223 requestBody, _ := common.GetRequestBody(c)
224 c.Request.Body = io.NopCloser(bytes.NewBuffer(requestBody))
225 return relayHandler(c, relayMode)
226}
227
228func wssRequest(c *gin.Context, ws *websocket.Conn, relayMode int, channel *model.Channel) *types.NewAPIError {
229 addUsedChannel(c, channel.Id)

Callers 1

RelayFunction · 0.85

Calls 3

GetRequestBodyFunction · 0.92
addUsedChannelFunction · 0.85
relayHandlerFunction · 0.85

Tested by

no test coverage detected