Hey, I'm trying to bind both json data AND query params in the same request.. when I use c.Bind and c.BindJSON together, gin tries to return a 400.
c.Bind(&example)
c.BindJson(&example)
Is there a way to avoid that 400 message?
[GIN-debug] [WARNING] Headers were already written. Wanted to override status code 400 with 200
duplicate of https://github.com/gin-gonic/gin/issues/742
I'm not sure I understand how this is a duplicate?
c.Bind and c.BindJson... in this case I understand the difference, but I want to bind both json data AND query params in the same request. When I use both of these functions together, gin tries to print out a http 400 response code that I have to override.It doesn't seem like I should have to override in order to do this.
Most helpful comment
I'm not sure I understand how this is a duplicate?
742 is an issue with the difference between
c.Bindandc.BindJson... in this case I understand the difference, but I want to bind both json data AND query params in the same request. When I use both of these functions together, gin tries to print out a http 400 response code that I have to override.It doesn't seem like I should have to override in order to do this.