rohankmr414 opened a new pull request, #1971:
URL: https://github.com/apache/iceberg-rust/pull/1971

   This pull request adds support for HTTP middleware in the 
`iceberg-catalog-rest` crate, allowing users to inject custom middleware (such 
as logging, retries, or authentication) into HTTP requests using the 
`reqwest-middleware` crate. The implementation is feature-gated and includes 
documentation, configuration options, and tests for middleware support.
   
   **Middleware support:**
   
   - Added an optional `middleware` feature to `Cargo.toml` that enables 
integration with the `reqwest-middleware` crate for custom HTTP middleware 
capabilities. 
[[1]](diffhunk://#diff-5db2732762b79f3e953637db818945e1c4294607c4d27aa88073aed7b5300318R38)
 
[[2]](diffhunk://#diff-5db2732762b79f3e953637db818945e1c4294607c4d27aa88073aed7b5300318R47-R56)
   - Extended the `RestCatalogBuilder` and `RestCatalogConfig` structs to 
support a `middleware_client` field, and provided a `with_middleware_client` 
method for configuration. 
[[1]](diffhunk://#diff-cb9d997d5104f8406186a80782bdc7f9bde4426ec307b73ce710d94bfae5ac5aR70-R71)
 
[[2]](diffhunk://#diff-cb9d997d5104f8406186a80782bdc7f9bde4426ec307b73ce710d94bfae5ac5aR176-R179)
 
[[3]](diffhunk://#diff-cb9d997d5104f8406186a80782bdc7f9bde4426ec307b73ce710d94bfae5ac5aR129-R157)
   - Updated the internal `HttpClient` to use the middleware client when 
configured, including logic in the `execute` method to route requests through 
middleware if present. 
[[1]](diffhunk://#diff-16bf49f58c29b89b99486d02abdef4c61c3c7701d5da1c5b2f3ba165189873d1R33-R34)
 
[[2]](diffhunk://#diff-16bf49f58c29b89b99486d02abdef4c61c3c7701d5da1c5b2f3ba165189873d1R65-R66)
 
[[3]](diffhunk://#diff-16bf49f58c29b89b99486d02abdef4c61c3c7701d5da1c5b2f3ba165189873d1R84-R97)
 
[[4]](diffhunk://#diff-16bf49f58c29b89b99486d02abdef4c61c3c7701d5da1c5b2f3ba165189873d1R268-R279)
   
   **Documentation:**
   
   - Added a new section to the `README.md` with usage instructions and 
examples for enabling and using middleware support.
   
   **Testing:**
   
   - Introduced new tests to verify middleware client integration and to 
demonstrate how custom middleware (such as request counting) can intercept 
requests.


-- 
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