EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
Get content type method
Yurii2454e90a2d02
diff --git a/application/Espo/Core/Api/Request.php b/application/Espo/Core/Api/Request.phpindex 5149866a10..4b58419bfc 100644--- a/application/Espo/Core/Api/Request.php+++ b/application/Espo/Core/Api/Request.php@@ -127,6 +127,13 @@ interface Request*/public function getServerParam(string $name);+ /**+ * Get the content type.+ *+ * @since 10.1.0+ */+ public function getContentType(): ?string;+/*** Get the PSR-7 request.*diff --git a/application/Espo/Core/Api/RequestNull.php b/application/Espo/Core/Api/RequestNull.phpindex d922450c8a..0ad1d40cec 100644--- a/application/Espo/Core/Api/RequestNull.php+++ b/application/Espo/Core/Api/RequestNull.php@@ -134,6 +134,11 @@ class RequestNull implements ApiRequestreturn null;}+ public function getContentType(): ?string+ {+ return null;+ }+public function toPsr7(): Psr7Request{$request = (new RequestFactory())->createRequest(Method::GET, "http://localhost");