Github user MikeThomsen commented on a diff in the pull request: https://github.com/apache/nifi/pull/2723#discussion_r192486471 --- Diff: nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/test/groovy/org/apache/nifi/lookup/RestLookupServiceIT.groovy --- @@ -106,6 +106,37 @@ class RestLookupServiceIT { } } + @Test + void testHeaders() { + runner.disableControllerService(lookupService) + runner.setProperty(lookupService, "header.X-USER", "jane.doe") + runner.setProperty(lookupService, "header.X-PASS", "testing7890") + runner.enableControllerService(lookupService) + + TestServer server = new TestServer() + ServletHandler handler = new ServletHandler() + handler.addServletWithMapping(SimpleJson.class, "/simple") + server.addHandler(handler) + try { + server.startServer() + + def coordinates = [ + "schema.name": "simple", + "endpoint": server.url + "/simple", --- End diff -- I like that. How about this breakdown: 1. `endpoint` is a template string set on a property descriptor and we use an EL compiler to generate the endpoint on the fly with those lookup coordinates. 2. Add `direct_endpoint` which is a treated as literal value to override that if present. 3. If both are present, throw an exception. Thoughts?
---