Commit 90e71380 authored by Andrew Dolgov's avatar Andrew Dolgov

api: support passing input parameters using JSON in HTTP POST data

parent a0e580b0
......@@ -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"]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment