You are here

function xmlrpc_server_output in xmlrpc 8

Sends XML-RPC output to the browser.

Parameters

string $xml: XML to send to the browser.

Return value

\Symfony\Component\HttpFoundation\Response A Response object.

2 calls to xmlrpc_server_output()
xmlrpc_server in ./xmlrpc.server.inc
Invokes XML-RPC methods on this server.
xmlrpc_server_error in ./xmlrpc.server.inc
Throws an XML-RPC error.

File

./xmlrpc.server.inc, line 137
Page callback file for the xmlrpc module.

Code

function xmlrpc_server_output($xml) {
  $xml = '<?xml version="1.0" encoding="utf-8" ?>' . "\n" . $xml;
  $headers = [
    'Content-Length' => strlen($xml),
    'Content-Type' => 'text/xml; charset=utf-8',
  ];
  return new Response($xml, 200, $headers);
}