Skip to content

Issue-432/stream headers#1317

Merged
Ryang-21 merged 3 commits intomasterfrom
issue-432/stream-headers
Jan 16, 2026
Merged

Issue-432/stream headers#1317
Ryang-21 merged 3 commits intomasterfrom
issue-432/stream-headers

Conversation

@Ryang-21
Copy link
Copy Markdown
Contributor

@Ryang-21 Ryang-21 commented Jan 14, 2026

  • Propagates header options from Horizon.Server instantiation to CallBuilder.stream()

Closes #432

Copilot AI review requested due to automatic review settings January 14, 2026 19:20
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Jan 14, 2026
@Ryang-21 Ryang-21 changed the title Issue 432/stream headers Issue-432/stream headers Jan 14, 2026
Copy link
Copy Markdown

Copilot AI left a comment

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 fixes an issue where custom app headers (X-App-Name and X-App-Version) were not being sent when using streaming connections via CallBuilder.stream(). Since EventSource doesn't support custom headers, the implementation converts these headers to query parameters for streaming requests while maintaining header-based transmission for regular HTTP requests.

Changes:

  • Added logic to extract X-App-Name and X-App-Version headers from httpClient defaults and append them as query parameters in streaming requests
  • Added comprehensive integration tests for both HTTP and streaming scenarios with custom headers
  • Updated unit test to include required httpClient parameter in CallBuilder constructor
  • Updated CHANGELOG to document the fix

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/horizon/call_builder.ts Implements header extraction logic that converts X-App-Name and X-App-Version headers to query parameters for EventSource streaming
test/integration/client_headers.test.ts Adds two new integration tests verifying headers are sent correctly for both HTTP requests and streaming connections
test/unit/call_builders.test.ts Updates CallBuilder instantiation to include required httpClient parameter
CHANGELOG.md Documents the fix for X-App-Name and X-App-Version headers in streaming requests

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

Comment thread CHANGELOG.md Outdated
@github-actions
Copy link
Copy Markdown

Size Change: +65.9 kB (+0.15%)

Total Size: 42.6 MB

Filename Size Change
dist/stellar-sdk-minimal.js 5.57 MB +11.4 kB (+0.21%)
dist/stellar-sdk-minimal.min.js 4.85 MB +5.08 kB (+0.1%)
dist/stellar-sdk-no-axios.js 5.57 MB +11.4 kB (+0.21%)
dist/stellar-sdk-no-axios.min.js 4.85 MB +5.07 kB (+0.1%)
dist/stellar-sdk-no-eventsource.js 5.82 MB +11.4 kB (+0.2%)
dist/stellar-sdk-no-eventsource.min.js 5.06 MB +5.08 kB (+0.1%)
dist/stellar-sdk.js 5.82 MB +11.4 kB (+0.2%)
dist/stellar-sdk.min.js 5.06 MB +5.07 kB (+0.1%)

compressed-size-action

@Ryang-21 Ryang-21 requested review from a team and Shaptic January 14, 2026 22:16
Comment thread src/horizon/call_builder.ts
@Ryang-21 Ryang-21 merged commit 47acf2b into master Jan 16, 2026
10 checks passed
@Ryang-21 Ryang-21 deleted the issue-432/stream-headers branch January 16, 2026 21:31
@github-project-automation github-project-automation bot moved this from Backlog (Not Ready) to Done in DevX Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

X-App-Name and X-App-Version provided as opts argument for new Server() do not propagate to Stream connections.

3 participants