diff --git a/src/Helpers/RequestHelper.php b/src/Helpers/RequestHelper.php index 771e2fa..378cb22 100644 --- a/src/Helpers/RequestHelper.php +++ b/src/Helpers/RequestHelper.php @@ -59,16 +59,23 @@ public function isJSON(): bool public function isForm(): bool { - $allowedTypes = [ - 'multipart/form-data', - 'application/x-www-form-urlencoded' - ]; - - return in_array( - needle: $this->getHeader('Content-Type'), - haystack: $allowedTypes, - strict: true - ); + $contentType = $this->getHeader('Content-Type'); + + if (str_contains( + haystack: $contentType, + needle: 'multipart/form-data' + )) { + return true; + } + + if (str_contains( + haystack: $contentType, + needle: 'application/x-www-form-urlencoded' + )) { + return true; + } + + return false; } /**