Skip to content

fix issue where body can be empty data on a put/post#3397

Open
jsjames wants to merge 1 commit intohey-api:mainfrom
jsjames:empty-body
Open

fix issue where body can be empty data on a put/post#3397
jsjames wants to merge 1 commit intohey-api:mainfrom
jsjames:empty-body

Conversation

@jsjames
Copy link
Contributor

@jsjames jsjames commented Feb 16, 2026

Fixes #3340

Currently when the body data is an empty array or empty object, the stripEmptySlots method will delete the body from the params, which then causes the POST / PUT to not succeed. This ensures that the body is never deleted and only gets added to the params of a PUT/POST when it is defined as a parameter.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@changeset-bot
Copy link

changeset-bot bot commented Feb 16, 2026

⚠️ No Changeset found

Latest commit: 0afdfd4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 16, 2026

@jsjames is attempting to deploy a commit to the Hey API Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug 🔥 Broken or incorrect behavior. labels Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🔥 Broken or incorrect behavior. size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Body of a json empty array should send to server

1 participant