Skip to content

[Destinations] Custom Destination Service Parameters and Chaining #895

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

MatKuhr
Copy link
Member

@MatKuhr MatKuhr commented Aug 18, 2025

Context

SAP/cloud-sdk-java-backlog#304.

This PR adds a generic option to set arbitrary headers for requests to the destination service.

Feature scope:

  • API to set custom headers
  • Cache handling
  • Tests
  • Limit headers to getSingle requests

Definition of Done

  • Functionality scope stated & covered
  • Tests cover the scope above
  • Error handling created / updated & covered by the tests above
  • Documentation updated
  • Release notes updated

public DestinationServiceOptionsAugmenter customHeaders( @Nonnull final Header... headers )
{
for( final Header header : headers ) {
parameters.put(CUSTOM_HEADER_KEY + header.getName(), header.getValue());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution uses a prefix, setting one option per header. That ensures the headers are directly respected for the cache key computation. If we were to store a nested map or other form of object, we'd have to check for equals/hashcode implementations.

@MatKuhr MatKuhr marked this pull request as ready for review August 18, 2025 07:53
@MatKuhr MatKuhr added please merge Request to merge a pull request please review Request to review a pull request labels Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
please merge Request to merge a pull request please review Request to review a pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant