Skip to content

feat: Add ODataClient for Apache HttpClient5#1169

Open
Jonas-Isr wants to merge 14 commits intomainfrom
odata-client-hc5
Open

feat: Add ODataClient for Apache HttpClient5#1169
Jonas-Isr wants to merge 14 commits intomainfrom
odata-client-hc5

Conversation

@Jonas-Isr
Copy link
Copy Markdown
Member

Context

SAP/cloud-sdk-java-backlog#504

This PR adds a new module to the Cloud SDK: datamodel/odata-client-apache-httpclient5. This aims to enable users to use Apaches HttpClient v5 in conjunction with our OData functionalities. I tried to stick as closely to the v4 implementation as possible while respecting the design choices of the new HttpClient v5.

This PR does not consider the high-level OData v2 and v4 modules. This will be handled in the future.

Comments regarding review

The first commit of this branch only features the copying of the v4 version of the module. If you want to see the changes that are made compared to our v4 version, look at the changes between the current state of the branch compared to the state after the first commit.

I am also happy to do pair reviews.

Feature scope:

  • Add new module for HttpClient v5 (by copying over the old v4 module and adapting it to v5)
  • Tests

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Documentation updated
    • I will consider documentation after the initial code reviews
  • Release notes updated

@Jonas-Isr Jonas-Isr self-assigned this May 8, 2026
JsonElement resultElement = element;
for( int i = 0; i < nodes.size(); i++ ) {
if( resultElement == null || !resultElement.isJsonObject() ) {
log.warn("JSON path {} could not be resolved for {} at position {}.", path, resultElement, i);
if( !resultElement.getAsJsonObject().entrySet().isEmpty() ) {
resultElement = resultElement.getAsJsonObject().entrySet().iterator().next().getValue();
} else {
log.warn("Wildcard in JSON path {} did not match anything for {}.", path, resultElement);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants