1
0
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:
Andrew Dolgov
2011-04-14 21:22:55 +04:00
parent a0e580b0ca
commit 90e71380ba

View File

@@ -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"]);
}