code: func (h mvccTxnHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
  	var data interface{}
  	params := mux.Vars(req)
  	var err error
  	switch h.op {
  	case opMvccGetByHex:
  		data, err = h.handleMvccGetByHex(params)
  	case opMvccGetByIdx:
  		if req.URL == nil {
  			err = errors.BadRequestf("Invalid URL")
  			break
  		}
  		values := make(url.Values)
  		err = parseQuery(req.URL.RawQuery, values, true)
  		if err == nil {
  			data, err = h.handleMvccGetByIdx(params, values)
  		}
  	case opMvccGetByKey:
  		decode := len(req.URL.Query().Get("decode")) > 0
  		data, err = h.handleMvccGetByKey(params, decode)
  	case opMvccGetByTxn:
  		data, err = h.handleMvccGetByTxn(params)
  	default:
  		err = errors.NotSupportedf("Operation not supported.")
  	}
  	if err != nil {
  		writeError(w, err)
  	} else {
  		writeData(w, data)
  	}
  }
docs: // ServeHTTP handles request of list a table's regions.