Skip to content

feat: support capturing and emitting header values#27

Merged
btrautmann merged 3 commits into
mainfrom
bt/feat/pass-headers
Jan 15, 2026
Merged

feat: support capturing and emitting header values#27
btrautmann merged 3 commits into
mainfrom
bt/feat/pass-headers

Conversation

@btrautmann

@btrautmann btrautmann commented Jan 15, 2026

Copy link
Copy Markdown
Contributor

📰 Summary of changes

What is the new functionality added in this PR?

This PR adds support for delivering response headers via the event listener system, enabling consuming applications to capture cookies and security headers for subsequent requests.

Functional changes:
New RequestCompleted event. This replaces MutativeRequestSuccess and:

  • Fires for all requests that receive a server response (success and error)
  • Includes response headers
  • Provides shouldTriggerDataMutation for consumers who need the previous mutation-tracking behavior

⚠️ Breaking changes:

  • MutativeRequestSuccess has been removed and replaced with RequestCompleted
  • Event listeners must update their switch statements to handle the new event type

🧪 Testing done

What testing was added to cover the functionality added in this PR

Unit tests were added for this functionality. Note: Because the primary test file was becoming unwieldy and didn't really follow a lot of our testing best practices (like test state isolation), we broke out a new test file rather than lumping into that one. In a future PR, I want to refactor the existing test file to break it into manageable chunks.

@btrautmann btrautmann requested review from a team as code owners January 15, 2026 17:35
joshdep
joshdep previously approved these changes Jan 15, 2026

@joshdep joshdep left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

domain lgtm

@ClaireDavis ClaireDavis 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.

domain lgtm
platform lgtm

@btrautmann btrautmann merged commit ed11f30 into main Jan 15, 2026
5 checks passed
@btrautmann btrautmann deleted the bt/feat/pass-headers branch January 15, 2026 18:42
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.

3 participants