We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35b0eb9 commit 03502e1Copy full SHA for 03502e1
src/Nono/Request.php
@@ -24,7 +24,7 @@ public function __construct()
24
{
25
$_SERVER;
26
if (!in_array($this->method(), ['GET', 'POST'])) {
27
- parse_str(file_get_contents('php://input'), $GLOBALS['_QUERY']);
+ parse_str($this->content(), $GLOBALS['_QUERY']);
28
}
29
30
@@ -58,6 +58,16 @@ public function method()
58
return $this->server('REQUEST_METHOD');
59
60
61
+ /**
62
+ * Return plain text request content.
63
+ *
64
+ * @return string
65
+ */
66
+ public function content()
67
+ {
68
+ return file_get_contents('php://input');
69
+ }
70
+
71
/**
72
* Return whether the request URL is HTTPS URL or not.
73
* Questionable reliability -> depends upon server config.
0 commit comments