code: func (h *FluxHandler) postFluxSpec(w http.ResponseWriter, r *http.Request) {
  	var req langRequest
  	ctx := r.Context()
  
  	err := json.NewDecoder(r.Body).Decode(&req)
  	if err != nil {
  		EncodeError(ctx, errors.MalformedDataf("invalid json: %v", err), w)
  		return
  	}
  
  	spec, err := flux.Compile(ctx, req.Query, h.Now())
  	if err != nil {
  		EncodeError(ctx, errors.InvalidDataf("invalid spec: %v", err), w)
  		return
  	}
  
  	res := postFluxSpecResponse{
  		Spec: spec,
  	}
  
  	if err := encodeResponse(ctx, w, http.StatusOK, res); err != nil {
  		logEncodingError(h.Logger, r, err)
  		return
  	}
  }
docs: // postFluxSpec returns a flux Spec for provided flux string