From 99acd15d9de370e56f3a4711614a05a88bcff3d1 Mon Sep 17 00:00:00 2001 From: Gintautas Miselis Date: Mon, 5 Apr 2021 13:28:58 +0300 Subject: [PATCH] Don't set request body for DELETE and OPTIONS requests --- src/Codeception/Lib/InnerBrowser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Codeception/Lib/InnerBrowser.php b/src/Codeception/Lib/InnerBrowser.php index 3b18f27..8f2e0b2 100644 --- a/src/Codeception/Lib/InnerBrowser.php +++ b/src/Codeception/Lib/InnerBrowser.php @@ -209,7 +209,7 @@ protected function clientRequest($method, $uri, array $parameters = [], array $f } } - if (!in_array($method, ['GET', 'HEAD'], true) && $content === null && !empty($parameters)) { + if (!in_array($method, ['GET', 'HEAD', 'DELETE', 'OPTIONS'], true) && $content === null && !empty($parameters)) { $content = http_build_query($parameters); } }