Skip to content

NXC-244: Forward custom header to nested services - #12

Closed
AsimaksiAnt wants to merge 1 commit into
mainfrom
fix_headers
Closed

AsimaksiAnt wants to merge 1 commit into
mainfrom
fix_headers

Conversation

@AsimaksiAnt

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings May 19, 2026 11:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the SDK service composition so that custom headers configured on NexusAPIService are also applied to requests made through nested service properties (DocumentStore* and Customer), aligning nested-service behavior with top-level API calls.

Changes:

  • Added a shared, optional headers dictionary to BaseService and forwarded it through selected service constructors.
  • Updated NexusAPIService to instantiate nested services using the same _headers dictionary so AddHeader affects them too.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Nexus.Crypto.SDK/Services/BaseService.cs Accepts an optional headers dictionary and uses it as the backing store for _headers.
src/Nexus.Crypto.SDK/NexusAPIService.cs Constructs nested services with the shared _headers so custom headers propagate.
src/Nexus.Crypto.SDK/Services/DocumentStoreSettingsService.cs Adds optional headers parameter and forwards it to BaseService.
src/Nexus.Crypto.SDK/Services/DocumentStoreTypeService.cs Adds optional headers parameter and forwards it to BaseService.
src/Nexus.Crypto.SDK/Services/DocumentStoreRecordService.cs Adds optional headers parameter and forwards it to BaseService.
src/Nexus.Crypto.SDK/Services/CustomerService.cs Adds optional headers parameter and forwards it to BaseService.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Nexus.Crypto.SDK/Services/BaseService.cs
Comment thread src/Nexus.Crypto.SDK/Services/DocumentStoreSettingsService.cs
Comment thread src/Nexus.Crypto.SDK/Services/DocumentStoreTypeService.cs
Comment thread src/Nexus.Crypto.SDK/Services/DocumentStoreRecordService.cs
Comment thread src/Nexus.Crypto.SDK/Services/CustomerService.cs
Comment thread src/Nexus.Crypto.SDK/NexusAPIService.cs
@AsimaksiAnt
AsimaksiAnt deleted the fix_headers branch May 19, 2026 14:27
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