Add Support for Custom Header Configurations in RESTCatalog #467
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR Fixes #455 by adding ability to use custom headers in PyIceberg's RESTCatalog, making it consistent with the Java implementation of the RESTCatalog. In the Java implementation, configs have the flexibility to be specified at two points: initially, through catalog properties provided at creation, and dynamically, based on the properties included in the server's response to the getConfig endpoint call. Which ensures that all the subsequent requests are made with these headers. One thing to call out is headers are also case insensitive, and this change respects that.
Catalog Properties
getConfig Response
Header logic in Java RESTCatalog: https://github.com/apache/iceberg/blob/4090a8860061f58748e3faa6804094f90d3575f3/core/src/main/java/org/apache/iceberg/rest/RESTSessionCatalog.java#L165
@Fokko @HonahX