code: func (c *Ctx) Decode(includeFormQueryParams bool, maxMemory int64, v interface{}) (err error) {
  
  	initFormDecoder()
  
  	typ := c.request.Header.Get(ContentType)
  
  	if idx := strings.Index(typ, ";"); idx != -1 {
  		typ = typ[:idx]
  	}
  
  	switch typ {
  
  	case ApplicationJSON:
  		err = json.NewDecoder(io.LimitReader(c.request.Body, maxMemory)).Decode(v)
  
  	case ApplicationXML:
  		err = xml.NewDecoder(io.LimitReader(c.request.Body, maxMemory)).Decode(v)
  
  	case ApplicationForm:
  
  		if err = c.ParseForm(); err == nil {
  			if includeFormQueryParams {
  				err = formDecoder.Decode(v, c.request.Form)
  			} else {
  				err = formDecoder.Decode(v, c.request.PostForm)
  			}
  		}
  
  	case MultipartForm:
  
  		if err = c.ParseMultipartForm(maxMemory); err == nil {
  			if includeFormQueryParams {
  				err = formDecoder.Decode(v, c.request.Form)
  			} else {
  				err = formDecoder.Decode(v, c.request.MultipartForm.Value)
  			}
  		}
  	}
  	return
  }
docs: // Decode takes the request and attempts to discover it's content type via
  // the http headers and then decode the request body into the provided struct.
  // Example if header was "application/json" would decode using
  // json.NewDecoder(io.LimitReader(c.request.Body, maxMemory)).Decode(v).