code: func (s *HTTPServer) ConfigApply(resp http.ResponseWriter, req *http.Request) (interface{}, error) {
  	args := structs.ConfigEntryRequest{
  		Op: structs.ConfigEntryUpsert,
  	}
  	s.parseDC(req, &args.Datacenter)
  	s.parseToken(req, &args.Token)
  
  	var raw map[string]interface{}
  	if err := decodeBody(req, &raw, nil); err != nil {
  		return nil, BadRequestError{Reason: fmt.Sprintf("Request decoding failed: %v", err)}
  	}
  
  	if entry, err := structs.DecodeConfigEntry(raw); err == nil {
  		args.Entry = entry
  	} else {
  		return nil, BadRequestError{Reason: fmt.Sprintf("Request decoding failed: %v", err)}
  	}
  
  	// Check for cas value
  	if casStr := req.URL.Query().Get("cas"); casStr != "" {
  		casVal, err := strconv.ParseUint(casStr, 10, 64)
  		if err != nil {
  			return nil, err
  		}
  		args.Op = structs.ConfigEntryUpsertCAS
  		args.Entry.GetRaftIndex().ModifyIndex = casVal
  	}
  
  	var reply bool
  	if err := s.agent.RPC("ConfigEntry.Apply", &args, &reply); err != nil {
  		return nil, err
  	}
  
  	return reply, nil
  }
docs: // ConfigCreate applies the given config entry update.