XMLRPC::Transport::HTTP (3)
Leading comments
Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) Standard preamble: ========================================================================
NAME
XMLRPC::Transport::HTTP - Server/Client side HTTP support for XMLRPC::LiteSYNOPSIS
- Client
-
use XMLRPC::Lite proxy => 'http://localhost/', # proxy => 'http://localhost/cgi-bin/xmlrpc.cgi', # local CGI server # proxy => 'http://localhost/', # local daemon server # proxy => 'login:password@localhost/cgi-bin/xmlrpc.cgi # local CGI server with authentication ; print getStateName(1);
- CGIserver
-
use XMLRPC::Transport::HTTP; my $server = XMLRPC::Transport::HTTP::CGI -> dispatch_to('methodName') -> handle ;
- Daemon server
-
use XMLRPC::Transport::HTTP; my $daemon = XMLRPC::Transport::HTTP::Daemon -> new (LocalPort => 80) -> dispatch_to('methodName') ; print "Contact to XMLRPC server at ", $daemon->url, "\n"; $daemon->handle;
DESCRIPTION
This class encapsulates allPROXY SETTINGS
You can use any proxy setting you use with LWP::UserAgent modules:
XMLRPC::Lite->proxy('endpoint.server proxy => ['http' => 'my.proxy.server']);
or
$xmlrpc->transport->proxy('http' => 'my.proxy.server');
should specify proxy server for you. And if you use "HTTP_proxy_user" and "HTTP_proxy_pass" for proxy authorization SOAP::Lite should know how to handle it properly.
COOKIE-BASED AUTHENTICATION
use HTTP::Cookies; my $cookies = HTTP::Cookies->new(ignore_discard => 1); # you may also add 'file' if you want to keep them between sessions my $xmlrpc = XMLRPC::Lite->proxy('http://localhost/'); $xmlrpc->transport->cookie_jar($cookies);
Cookies will be taken from response and provided for request. You may always add another cookie (or extract what you need after response) with HTTP::Cookies interface.
You may also do it in one line:
$xmlrpc->proxy('http://localhost/', cookie_jar => HTTP::Cookies->new(ignore_discard => 1));
COMPRESSION
XMLRPC::Lite provides you option for enabling compression on wire (for Having options on client and server side that let you specify threshold for compression you can safely enable this feature on both client and server side.
Compression will be enabled on client side
Server will accept compressed message if module Compress::Zlib is available, and will respond with compressed message
DEPENDENCIES
Crypt::SSLeay for HTTPS/SSL HTTP::Daemon for XMLRPC::Transport::HTTP::Daemon Apache, Apache::Constants for XMLRPC::Transport::HTTP::Apache
SEE ALSO
See ::CGI, ::Daemon and ::Apache for implementation details. See examples/XMLRPC/* for examples.
COPYRIGHT
Copyright (C) 2000-2001 Paul Kulchenko. All rights reserved.This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.