Skip to content

Commit

Permalink
fix: boolean and null literal should be send to request promise as st…
Browse files Browse the repository at this point in the history
…rings
  • Loading branch information
TheoAnastasiadis committed Jan 31, 2024
1 parent 41ed240 commit 3ae45a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/server/lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,10 @@ module.exports = function (options = {}) {
// either turn these both on or off
options.followAllRedirects = options.followRedirect

if (options.json === true) {
if (options.body === true || options.body === false || options.body === null) options.body = String(options.body)
}

if (options.form === true) {
// reset form to whatever body is
// and nuke body
Expand Down

0 comments on commit 3ae45a1

Please sign in to comment.