Skip to content

Commit

Permalink
README.md: fix a typo (#2913)
Browse files Browse the repository at this point in the history
  • Loading branch information
kulong0105 committed Oct 22, 2021
1 parent 464535f commit 34ae777
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -2000,7 +2000,7 @@ func SomeHandler(c *gin.Context) {
objA := formA{}
objB := formB{}
// This reads c.Request.Body and stores the result into the context.
if errA := c.ShouldBindBodyWith(&objA, binding.JSON); errA == nil {
if errA := c.ShouldBindBodyWith(&objA, binding.Form); errA == nil {
c.String(http.StatusOK, `the body should be formA`)
// At this time, it reuses body stored in the context.
} else if errB := c.ShouldBindBodyWith(&objB, binding.JSON); errB == nil {
Expand Down

0 comments on commit 34ae777

Please sign in to comment.