Support feed over http using vespa-feed-client
@@ -147,8 +147,9 @@ public class VespaRecordWriter extends RecordWriter<Object, Object> {
}
private static List<URI> endpointUris(VespaConfiguration config) {
+ String scheme = config.useSSL() ? "https" : "http";
return Arrays.stream(config.endpoint().split(","))
- .map(hostname -> URI.create(String.format("https://%s:%d/", hostname, config.defaultPort())))
+ .map(hostname -> URI.create(String.format("%s://%s:%d/", scheme, hostname, config.defaultPort())))
.collect(toList());
}
}
