Skip to content

Conversation

daniel-graham-amplitude
Copy link
Collaborator

Summary

The consumption checker is a problem if 2+ instances of Amplitude are on a website, because it will consume body and headers 2+ times and cause an error to be thrown.

Replacing the consumption checker with a body cache for fetch that caches the body response to prevent cloning from happening 2x.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?:

@daniel-graham-amplitude daniel-graham-amplitude changed the title fix: replace consumption check with cache fix(plugin-network-autocapture): replace consumption check with cache Aug 26, 2025
@daniel-graham-amplitude daniel-graham-amplitude merged commit 9c41081 into main Aug 26, 2025
8 checks passed
@daniel-graham-amplitude daniel-graham-amplitude deleted the AMP-137112/add-caching-to-headers-and-body branch August 26, 2025 19:06
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