Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

841610017534_.pic_hd.jpg

到执行c.ShouldBindJSON(&req)这句话的时候, 就一直卡这不动了
前端请求半小时 这句话就卡半小时


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.5k views
Welcome To Ask or Share your Answers For Others

1 Answer

你看看官方的例子,是不是这个函数里边有报错,你把错误打印出来看看啥情况

if err := c.ShouldBindJSON(&json); err != nil {
         c.JSON(http.StatusBadRequest, gin.H{"error": "Login information is not complete"})
         return
      }

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...