|
...
|
...
|
@@ -11,6 +11,7 @@ class SimpleRequest |
|
|
|
public string $method;
|
|
|
|
public array $header;
|
|
|
|
public array $cookie;
|
|
|
|
public string $rawContent;
|
|
|
|
|
|
|
|
public function __construct($data)
|
|
|
|
{
|
|
...
|
...
|
@@ -21,5 +22,14 @@ class SimpleRequest |
|
|
|
$this->method = $data['method'];
|
|
|
|
$this->header = $data['header'];
|
|
|
|
$this->cookie = $data['cookie'];
|
|
|
|
$this->rawContent = $data['rawContent'];
|
|
|
|
if ($this->method == 'POST') {
|
|
|
|
if (count($this->post) == 0) {
|
|
|
|
$data = json_decode($this->rawContent, true);
|
|
|
|
if ($data) {
|
|
|
|
$this->post = $data;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|