Home » Web Services » XML_RPC » Bug #3121
different output method
Details
| Request #3121 | different output method |
|---|---|
| Submitted | 2005-01-06 11:03 UTC |
| From | vincent at dauphin-mm dot nl |
| Assigned | danielc |
| Status | Closed |
| Package | XML_RPC |
| PHP Version | 4.3.9 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2005-01-06 11:03 UTC] vincent at dauphin-mm dot nl
Description:
------------
It would be nice to be able to select a different output method instead of dumping the resulting output to stdout en setting the headers with the header() function.
It would be nice to have the result avaible in variables like $xmlrpc_server->headers (assoc array) and $xmlrpc_server->payload.
I would like this so I can use XML_RPC in combination with the pear HTTP_Server.
Reproduce code:
---------------
Something like this:
class HTTP_Server_XMLRPC extends HTTP_Server {
function POST($clientId, &$request) {
$GLOBALS['HTTP_RAW_POST_DATA'] = $request->content;
$server = new XML_RPC_Server($methodmap, $outputmethod);
return array(
'code' => 200,
'headers' => $server->headers,
'body' => $server->payload,
);
}
}