title: Cannot get form post body from Go gin context
body: <p>I have updated gin-gonic and want to use it to save a form. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>import (
      "fmt"
      "github.com/gin-gonic/contrib/sessions"
      "github.com/gin-gonic/gin"
  ...
  
  
  func HandlePost(c *gin.Context) {
      userId, userName := getUserId(c)
  
      title := c.PostForm("title")
      content := c.PostForm("content")
  
      fmt.Println("userId is:", userId) //ok
      fmt.Println("userName is: ", userName) //ok
      fmt.Println("title is:", title) //empty
      fmt.Println("content is: ", content) //empty
  
  ...
  </code></pre>
  
  <p>I use Postman to post form, like this:</p>
  
  <p><a href="https://i.stack.imgur.com/n0L7p.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n0L7p.png" alt="enter image description here"></a></p>
  
  <p>I don't get any errors but received form fields are empty. So wondering what could be wrong here and how to fix it?</p>
  
  <p>Update: here is how I implemented <code>getUserId</code>:</p>
  
  <pre><code>func getUserId(c *gin.Context) (int, string) {
      var user []model.User
      session := sessions.Default(c)
      userEmail := session.Get("user-id").(string)
      if userEmail == "" {
          fmt.Println("userEmail NOT found")
      } else {
          err := shared.Dbmap.Select(&amp;user, "SELECT * FROM user WHERE email = ? LIMIT 1", userEmail)
          if err != nil {
              log.Panic(err)
          }
      }
      return user[0].Id, user[0].UserName
  }
  </code></pre>