adutra commented on code in PR #18756:
URL: https://github.com/apache/iceberg/pull/18756#discussion_r4454085883


##########
core/src/main/java/org/apache/iceberg/rest/RESTClient.java:
##########
@@ -226,4 +226,14 @@ <T extends RESTResponse> T postForm(
   default RESTClient withAuthSession(AuthSession session) {
     return this;
   }
+
+  /**
+   * Unwraps this client to the given type, if possible. This allows callers 
to access the
+   * underlying HTTP library used by this client.
+   *
+   * @return the unwrapped client, or null if this client cannot be unwrapped 
to the given type
+   */
+  default <T> T unwrap(Class<T> type) {
+    return type.isInstance(this) ? type.cast(this) : null;
+  }

Review Comment:
   Also: a dedicated second client is not necessary to define different proxy 
or TLS settings for the authorization server; the Apache `HttpClient` supports 
per-host routing and per-host TLS settings within one client.
   
   The issue is what Iceberg's `HTTPClient` exposes. TLS is already 
configurable via `TLSConfigurer`. Proxy settings however cannot be configured 
on a per-host basis today, but that could be improved with the addition of a 
small `ProxyConfigurer` interface.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to