
WWW::Snooze::Request - Main request object featuring autoloading

Override headers with an instance of HTTP::Headers
Override serializer with and instance of WWW::Snooze::Serialize
Perform HTTP operation on URL, %data is encoded using the serializer.

The request object uses autoloading method names to build the request. Calling a method on the request object will add that method name on to the URL stack and return a new request object with the new stack.
Automatic methods can be called with an id argument,
or undef if there is no id,
and named parameters which are encoded to a query string
my $r = WWW::Snooze::Request->new('http://example.com');
$r->foo();
# Request URL would be http://example.com/foo.json
$r->foo(42)->bar;
# http://example.com/foo/42/bar.json
$r->foo(undef, foo => 'bar');
# http://example.com/foo?foo=bar
Automatic methods are built using this private function, however you can also revert to calling this directly in the case of a namespace collision with an element or a poorly named element.
$r->_add_element('poorly named');
# http://example.com/poorly%20named
$r->_add_element('foo', 42, foo => bar);
# http://example.com/foo/42.json?foo=bar

Privately scoped to avoid namespace collision
Return query string arguments added
Return the serializer
Return the HTTP::Headers object

Anthony Johnson <aj@ohess.org>