NAME

RPC::Any::Server::XMLRPC::HTTP - An XML-RPC server that understands HTTP

SYNOPSIS

use RPC::Any::Server::XMLRPC::HTTP;
# Create a server where calling Foo.bar will call My::Module->bar.
my $server = RPC::Any::Server::XMLRPC::HTTP->new(
   dispatch  => { 'Foo' => 'My::Module' },
   send_nil  => 0,
   allow_get => 0,
);
# Read from STDIN and print result, including HTTP headers, to STDOUT.
print $server->handle_input();

# HTTP servers also take HTTP::Request objects, if you want.
my $request = HTTP::Request->new(POST => '/');
$request->content('<?xml ... ');
print $server->handle_input($request);

DESCRIPTION

This is a type of RPC::Any::Server::XMLRPC that understands HTTP. It has all of the features of RPC::Any::Server, RPC::Any::Server::XMLRPC, and RPC::Any::Interface::HTTP. You should see those modules for information on configuring this server and the way it works.

For the most part, this implementation ignores HTTP headers on input. However, it can be helpful to specify charset=UTF-8 in your Content-Type request header if you want Unicode to be handled properly.

HTTP GET SUPPORT

There is no support for HTTP GET in the normal XML-RPC spec. However, if you have allow_get set to 1, then this server will accept a query string that is raw (URI-escaped) XML as its XML-RPC input, during GET requests. So, for example, you could call GET on a URL like:

/?%3C%3Fxml%20version%3D%221.0%22%3E%3CmethodCall%3E...

(That query string is the url-escaped version of <?xml version="1.0"><methodCall>....)