code: func (h *Handler) handlePostClusterResizeRemoveNode(w http.ResponseWriter, r *http.Request) {
  	if !validHeaderAcceptJSON(r.Header) {
  		http.Error(w, "JSON only acceptable response", http.StatusNotAcceptable)
  		return
  	}
  	// Decode request.
  	var req removeNodeRequest
  	err := json.NewDecoder(r.Body).Decode(&req)
  	if err != nil {
  		http.Error(w, err.Error(), http.StatusBadRequest)
  		return
  	}
  
  	removeNode, err := h.api.RemoveNode(req.ID)
  	if err != nil {
  		if errors.Cause(err) == pilosa.ErrNodeIDNotExists {
  			http.Error(w, "removing node: "+err.Error(), http.StatusNotFound)
  		} else {
  			http.Error(w, "removing node: "+err.Error(), http.StatusInternalServerError)
  		}
  		return
  	}
  
  	// Encode response.
  	if err := json.NewEncoder(w).Encode(removeNodeResponse{
  		Remove: removeNode,
  	}); err != nil {
  		h.logger.Printf("response encoding error: %s", err)
  	}
  }
docs: // handlePostClusterResizeRemoveNode handles POST /cluster/resize/remove-node request.