Hello asaris,
I use the qooxdoo php backend.
When I cut this from the index php:
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
/*
* For POST data, the only acceptable content type is application/json.
*/
switch($_SERVER["CONTENT_TYPE"])
{
case "application/json":
/* We found literal POSTed json-rpc data (we hope) */
$input = file_get_contents('php://input');
$jsonInput = $json->decode($input);
break;
default:
/*
* This request was not issued with JSON-RPC so echo the error
rather
* than issuing a JsonRpcError response.
*/
echo
"JSON-RPC request expected; " .
"unexpected data received";
exit;
}
}
else if ($_SERVER["REQUEST_METHOD"] == "GET" &&
isset($_GET["_ScriptTransport_id"]) &&
$_GET["_ScriptTransport_id"] != ScriptTransport_NotInUse &&
isset($_GET["_ScriptTransport_data"]))
{
/* We have what looks like a valid ScriptTransport request */
$scriptTransportId = $_GET["_ScriptTransport_id"];
$error->SetScriptTransportId($scriptTransportId);
$input = $_GET["_ScriptTransport_data"];
$jsonInput = $json->decode(get_magic_quotes_gpc()
? stripslashes($input)
: $input);
}
and paste ethe following:
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
echo "POST";
}
else if ($_SERVER["REQUEST_METHOD"] == "GET" &&
isset($_GET["_ScriptTransport_id"]) &&
$_GET["_ScriptTransport_id"] != ScriptTransport_NotInUse &&
isset($_GET["_ScriptTransport_data"]))
{
echo "GET";
}
"GET" is always returned.
The index.php doesn`t receive the data via POST :(
The Problem is that some of my requests are to long to send them via GET.
Please help!!
Philipp
asaris wrote:
>
> Philipp,
>
> qx.io.remote.Rpc does send request in raw POST.
>
> You can access POST content by file_get_contents('php://input');
>
> But why don't you use PHP RPC backend located at
> qooxdoo/backend/php/services/?
>
> asaris
>
> Philipp Wabinski wrote:
>> Hello,
>>
>> is it possible to send a async rpc call from the frontend to the backend
>> via
>> POST?
>>
>> When I echo the $_SERVER["REQUEST_METHOD"] in the php backend, it always
>> returns "GET".
>>
>> Is there a setting or sometjhing like that to use POST?
>>
>> Thanks for your answer
>>
>> Philipp
>>
>
>
--
View this message in context:
http://www.nabble.com/Send-async-rpc-via-POST--tp18606916p18607247.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel