mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 01:25:56 +00:00
api: support passing input parameters using JSON in HTTP POST data
This commit is contained in:
@@ -21,6 +21,17 @@
|
||||
|
||||
session_name($session_name);
|
||||
|
||||
$input = file_get_contents("php://input");
|
||||
|
||||
// Override $_REQUEST with JSON-encoded data if available
|
||||
if ($input) {
|
||||
$input = json_decode($input, true);
|
||||
|
||||
if ($input) {
|
||||
$_REQUEST = $input;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_REQUEST["sid"]) {
|
||||
session_id($_REQUEST["sid"]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user