nastra commented on code in PR #5998:
URL: https://github.com/apache/iceberg/pull/5998#discussion_r996885088
##########
core/src/main/java/org/apache/iceberg/rest/HTTPClient.java:
##########
@@ -323,8 +330,15 @@ public Builder withHeaders(Map<String, String> headers) {
return this;
}
+ public Builder withObjectMapper(ObjectMapper objectMapper) {
+ this.mapper = objectMapper;
+ return this;
+ }
+
public HTTPClient build() {
- return new HTTPClient(uri, baseHeaders);
+ withHeader(CLIENT_VERSION_HEADER, IcebergBuild.fullVersion());
+ withHeader(CLIENT_GIT_COMMIT_SHORT_HEADER,
IcebergBuild.gitCommitShortId());
Review Comment:
I think it's better to add those 2 headers by default in `build()` rather
than having a method that would need an explicit call for adding them
--
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]