code: func ParseParams(params *Params, req *Request) {
  	params.Query = req.GetQuery()
  
  	// Parse the body depending on the content type.
  	switch req.ContentType {
  	case "application/x-www-form-urlencoded":
  		// Typical form.
  		var err error
  		if params.Form, err = req.GetForm(); err != nil {
  			paramsLogger.Warn("ParseParams: Error parsing request body", "error", err)
  		}
  
  	case "multipart/form-data":
  		// Multipart form.
  		if mp, err := req.GetMultipartForm(); err != nil {
  			paramsLogger.Warn("ParseParams: parsing request body:", "error", err)
  		} else {
  			params.Form = mp.GetValues()
  			params.Files = mp.GetFiles()
  		}
  	case "application/json":
  		fallthrough
  	case "text/json":
  		if body := req.GetBody(); body != nil {
  			if content, err := ioutil.ReadAll(body); err == nil {
  				// We wont bind it until we determine what we are binding too
  				params.JSON = content
  			} else {
  				paramsLogger.Error("ParseParams: Failed to ready request body bytes", "error", err)
  			}
  		} else {
  			paramsLogger.Info("ParseParams: Json post received with empty body")
  		}
  	}
  
  	params.Values = params.calcValues()
  }
docs: // ParseParams parses the `http.Request` params into `revel.Controller.Params`