Have XML End point - want to capture and validate xml Root Element of the 
request

r.POST("/endpoint", func(c *gin.Context) {
   
    // capture and validate if Root Element is correct
    // if I use c.Request.Body buffer then c.Bind() will not get data 
   
    if c.Bind(&searchRequest) == nil {
          //do work
          c.JSON(200, response)
    }
}

Please help

Thanks in advance

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to