SYNOPSIS

    $resp = $ua->request($request);

    if($resp->is_success()) {
        print $resp->as_string();
    }

    if($resp->is_error()) {
        print $resp->message();
    }

    if($resp->is_success()) {
        for my $property ($resp->properties) {
            print $property->as_string(), "\n";
        }
    }

DESCRIPTION

\*(C`Net::Amazon::Response\*(C' is the baseclass for responses coming back from the useragent's \*(C`request\*(C' method. Responses are typically not of type \*(C`Net::Amazon::Response\*(C' but one of its subclasses \*(C`Net::Amazon::Response::*\*(C'. However, for basic error handling and dumping content, \*(C`Net::Amazon::Response\*(C''s methods are typically used, because we typically don't know what type of object we're actually dealing with.

\s-1METHODS\s0

is_success()

Returns true if the request was successful. This doesn't mean any objects have been found, it just indicates a successful roundtrip.

is_error()

Returns true if an error occurred. Use \*(C`message()\*(C' to determine what kind of error.

properties()

Returns the list of \*(C`Net::Amazon::Property\*(C' objects which were found by the query.

as_string()

Dumps the content of the response.

message()

Returns the error message as a string in case an error occurred. In case several errors occurred, they're stringed together. Look up \*(C`messages()\*(C' if you need them separated.

messages()

Returns all error messages for a response as a reference to an array of string messages.

AUTHOR

Mike Schilli, <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2003 by Mike Schilli <[email protected]>

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