NAME

Froody::Server - baseclass for Froody::Server

DESCRIPTION

A Froody server. use as:

#!/usr/bin/perl

use warnings;
use strict;

use Froody::Server;
Froody::Server->dispatch();

..in a CGI script that is a Froody endpoint.

This server accepts a CGI request as the Froody request, and will dispatch the method, and return the XML of the response as the result of the HTTP request. If the dispatcher throws an error, we catch it and wrap it in a Froody::Response object that represents the error.

You can pass a namespace to dispatch into to the dispatch() call, to override the default Froody::Dispatch namespace. This is strongly recommended, or your code will be fairly useless.

METHODS

dispatch()

Detects the environment that the Froody server is running under, assembles a request, and dispatches it. Replies to the request with the XML response.

send_header
send_response
handler

Handler for apache. Passes the request off to dispatch() and returns &Apache::OK if it succeeds.

Subclassing

There's serveral methods you might want to override in subclasses of these. In particular these methods define what helper classes this uses:

server_class
dispatch_class
request_class

These methods define a few constants:

content_type

The header content_type. By default, it's "text/xml; charset=utf-8"

BUGS

None known.

Please report any bugs you find via the CPAN RT system. http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Froody

AUTHOR

Copyright Fotango 2005. All rights reserved.

Please see the main Froody documentation for details of who has worked on this project.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

Froody, Froody::Dispatch, Froody::Server::Standalone, Froody::Server::CGI, Froody::Server::Apache