[
https://issues.apache.org/jira/browse/NIFI-5214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16501596#comment-16501596
]
ASF GitHub Bot commented on NIFI-5214:
--------------------------------------
Github user MikeThomsen commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2723#discussion_r193032153
--- Diff:
nifi-nar-bundles/nifi-standard-services/nifi-lookup-services-bundle/nifi-lookup-services/src/main/java/org/apache/nifi/lookup/RestLookupService.java
---
@@ -277,6 +280,20 @@ private void setProxy(OkHttpClient.Builder builder) {
}
}
+ protected String determineEndpoint(Map<String, Object> coordinates) {
+ if (coordinates.containsKey(ENDPOINT_KEY) &&
coordinates.containsKey(ENDPOINT_TEMPLATE_KEY)) {
+ Map<String, String> converted = coordinates.entrySet().stream()
+ .collect(Collectors.toMap(
+ e -> e.getKey(),
+ e -> e.getValue().toString()
+ ));
+ final PreparedQuery query =
Query.prepare((String)coordinates.get(ENDPOINT_KEY));
--- End diff --
I think that would work.
> Add a REST lookup service
> -------------------------
>
> Key: NIFI-5214
> URL: https://issues.apache.org/jira/browse/NIFI-5214
> Project: Apache NiFi
> Issue Type: New Feature
> Reporter: Mike Thomsen
> Assignee: Mike Thomsen
> Priority: Major
>
> * Should have reader API support
> * Should be able to drill down through complex XML and JSON responses to a
> nested record.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)