The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

RDF::Sesame::Response - A response of a Sesame server to a command

DESCRIPTION

This class is mostly used internally, but it's documented here in case others find use for it. This object contains information about the response from the Sesame server and provides useful ways to access the information. After one executes RDF::Sesame::Connection::command or RDF::Sesame::Repository::command, one should check the response object to determine if the command was completed successfully.

Just to say it one more time, most users won't need this class. Use the methods provided by RDF::Sesame::Repository instead.

METHODS

new

Constructs a new RDF::Sesame::Response object from an HTTP::Response object from a Sesame server.

content

This method is a shortcut for $r->http_response()->content(). Namely, it returns the content of the HTTP::Response object from which this RDF::Sesame::Response object was constructed.

errstr

Returns the error message provided by the Sesame server. If there was no error message, returns the empty string.

http_response

Returns the HTTP::Response object representing the original HTTP response from the server. This allows one access to the lower-level details about the response.

is_binary_results

Returns a true value if the Sesame response contained a binary RDF table results payload; otherwise, returns false. The determination is based on the Content-Type header of the HTTP response.

is_xml

Returns a true value if the Sesame response contained an XML payload; otherwise, returns false. The determination is based on the Content-Type header of the HTTP response.

parsed_xml

Returns a hashref representation of the XML returned by the Sesame server. If no XML is available, returns an empty hashref. XML::Simple is used to parse the XML.

success

Returns 1 if the response from the server indicates that the command was completed successfully, otherwise it returns the empty string.

xml

Returns the raw XML returned by the Sesame server. This value will only be available if the response actually included XML. If it didn't, the empty string is returned.

AUTHOR

Michael Hendricks <michael@ndrix.org>

LICENSE AND COPYRIGHT

Copyright (c) 2005-2006 Michael Hendricks (<michael@ndrix.org>). All rights reserved.

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