code: @Override
      public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {
          String location = locationFunction.apply(ctx);
          requireNonNull(location, "locationFunction returned null.");
  
          if (preserveQueryString) {
              location = appendQueryString(ctx, location);
          }
  
          return HttpResponse.of(HttpHeaders.of(httpStatus)
                                            .set(HttpHeaderNames.LOCATION, location));
      }
docs: NB: For now we redirect all methods.