mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-18 01:06:39 +08:00
docs: update comments
This commit is contained in:
parent
dae91ed243
commit
f0994ba457
@ -229,16 +229,16 @@ func parameterHandlerMiddleware() gin.HandlerFunc {
|
|||||||
params[key][i] = strings.TrimSpace(value)
|
params[key][i] = strings.TrimSpace(value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 更新参数
|
// update get parameters
|
||||||
c.Request.URL.RawQuery = params.Encode()
|
c.Request.URL.RawQuery = params.Encode()
|
||||||
|
// skip file upload requests
|
||||||
contentType := c.Request.Header.Get("Content-Type")
|
contentType := c.Request.Header.Get("Content-Type")
|
||||||
if strings.Contains(contentType, "multipart/form-data") {
|
if strings.Contains(contentType, "multipart/form-data") {
|
||||||
c.Next()
|
c.Next()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST JSON 参数处理
|
// process POST JSON request body
|
||||||
bodyBytes, err := io.ReadAll(c.Request.Body)
|
bodyBytes, err := io.ReadAll(c.Request.Body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.Next()
|
c.Next()
|
||||||
|
Loading…
Reference in New Issue
Block a user