-
-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ClientRequest): set null body for GET/HEAD requests (#364)
Creating a GET or HEAD fetch Request with a non-null/undefined body throws a `TypeError`. Some (possibly misbehaving) clients (notably the Stripe Node library) write an empty string to the request buffer even for GET/HEAD, causing a failure when intercepting any of those requests. A test has been added to `createRequest.test.ts` that fails without this change. Co-authored-by: Graham Floyd <[email protected]>
- Loading branch information
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters