summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/Web/THttpRequest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/Web/THttpRequest.php b/framework/Web/THttpRequest.php
index c3926d08..34ba3f75 100644
--- a/framework/Web/THttpRequest.php
+++ b/framework/Web/THttpRequest.php
@@ -319,6 +319,14 @@ class THttpRequest extends TApplicationComponent implements IteratorAggregate,Ar
}
/**
+ * @return string content type (e.g. 'application/json') or null if not specified
+ */
+ public function getContentType()
+ {
+ return isset($_SERVER['CONTENT_TYPE']) ? $_SERVER['CONTENT_TYPE'] : null;
+ }
+
+ /**
* @return boolean if the request is sent via secure channel (https)
*/
public function getIsSecureConnection()