摘要:
r = gin.Default()//解决跨域r.Use(Cors()) func Cors() gin.HandlerFunc { return func(c *gin.Context) { method := c.Request.Method c.Header("Access-Control-A 阅读全文
摘要:
buf := make([]byte, 1024)n, _ := c.Request.Body.Read(buf)c.Request.Body = ioutil.NopCloser(bytes.NewReader(buf[:n]))j := buf[0:n]fmt.Println("body:", 阅读全文