docs: @Override
    public void execute(final TSDB tsdb, final HttpQuery query) 
      throws IOException {
      
      // only accept GET/POST/DELETE
      if (query.method() != HttpMethod.GET && query.method() != HttpMethod.POST &&
          query.method() != HttpMethod.DELETE) {
        throw new BadRequestException(HttpResponseStatus.METHOD_NOT_ALLOWED, 
            "Method not allowed", "The HTTP method [" + query.method().getName() +
            "] is not permitted for this endpoint");
      }
      if (query.method() == HttpMethod.DELETE && 
          !tsdb.getConfig().getBoolean("tsd.http.query.allow_delete")) {
        throw new BadRequestException(HttpResponseStatus.BAD_REQUEST,
                 "Bad request",
                 "Deleting data is not enabled (tsd.http.query.allow_delete=false)");
      }
      
      final String[] uri = query.explodeAPIPath();
      final String endpoint = uri.length > 1 ? uri[1] : ""; 
      
      if (endpoint.toLowerCase().equals("last")) {
        handleLastDataPointQuery(tsdb, query);
      } else if (endpoint.toLowerCase().equals("gexp")){
        handleQuery(tsdb, query, true);
      } else if (endpoint.toLowerCase().equals("exp")) {
        handleExpressionQuery(tsdb, query);
        return;
      } else {
        handleQuery(tsdb, query, false);
      }
    }