code: func (c *Context) Negotiate(code int, config Negotiate) {
  	switch c.NegotiateFormat(config.Offered...) {
  	case binding.MIMEJSON:
  		data := chooseData(config.JSONData, config.Data)
  		c.JSON(code, data)
  
  	case binding.MIMEHTML:
  		data := chooseData(config.HTMLData, config.Data)
  		c.HTML(code, config.HTMLName, data)
  
  	case binding.MIMEXML:
  		data := chooseData(config.XMLData, config.Data)
  		c.XML(code, data)
  
  	default:
  		c.AbortWithError(http.StatusNotAcceptable, errors.New("the accepted formats are not offered by the server")) // nolint: errcheck
  	}
  }
docs: // Negotiate calls different Render according acceptable Accept format.