stillalex commented on code in PR #1954:
URL: https://github.com/apache/solr/pull/1954#discussion_r1341986862


##########
solr/core/src/java/org/apache/solr/cli/ApiTool.java:
##########
@@ -57,27 +57,28 @@ public List<Option> getOptions() {
             .hasArg()
             .required(true)
             .desc("Send a GET request to a Solr API endpoint.")
-            .build());
+            .build(),
+        SolrCLI.OPTION_CREDENTIALS);
   }
 
   @Override
   public void runImpl(CommandLine cli) throws Exception {
     String response = null;
     String getUrl = cli.getOptionValue("get");
     if (getUrl != null) {
-      response = callGet(getUrl);
+      response = callGet(getUrl, cli.getOptionValue("credentials"));

Review Comment:
   wondering if instead of hardcoding the name to `"credentials"` everywhere we 
could actually use 
`cli.getOptionValue(SolrCLI.OPTION_CREDENTIALS.getLongOpt())` instead (using 
`getLongOpt` to have `credentials` as `getOpt` would be `u`).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to