amogh-jahagirdar commented on code in PR #10052: URL: https://github.com/apache/iceberg/pull/10052#discussion_r1543178811
########## core/src/main/java/org/apache/iceberg/rest/HTTPClient.java: ########## @@ -120,6 +128,13 @@ private HTTPClient( int maxRetries = PropertyUtil.propertyAsInt(properties, REST_MAX_RETRIES, 5); clientBuilder.setRetryStrategy(new ExponentialHttpRequestRetryStrategy(maxRetries)); + if (proxy != null) { + if (credsProvider != null) { + clientBuilder.setDefaultCredentialsProvider(credsProvider); + } Review Comment: Style nit: new line after if blocks ########## core/src/main/java/org/apache/iceberg/rest/HTTPClient.java: ########## @@ -468,6 +486,20 @@ public Builder uri(String path) { return this; } + public Builder withProxy(String hostname, int port) { + Preconditions.checkNotNull(hostname, "Invalid hostname for http client proxy: null"); + this.proxy = new HttpHost(hostname, port); + return this; + } + + public Builder withProxyBasicAuthentication(String username, String password) { Review Comment: Would a better API just be passing the `CredentialsProvider`? That way it's more generic than just having a specific one for basic authentication. The user can construct their own and pass it in. ``` public Builder withProxyCredentialsProvider(CredentialsProvider); ``` -- 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...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org