RDF::Sesame::Response - A response of a Sesame server to a command
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.
Constructs a new RDF::Sesame::Response object from an HTTP::Response object from a Sesame server.
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.
$r->http_response()->content()
Returns the error message provided by the Sesame server. If there was no error message, returns the empty string.
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.
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.
Content-Type
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.
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.
Returns 1 if the response from the server indicates that the command was completed successfully, otherwise it returns the empty string.
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.
Michael Hendricks <michael@ndrix.org>
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.
To install RDF::Sesame, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RDF::Sesame
CPAN shell
perl -MCPAN -e shell install RDF::Sesame
For more information on module installation, please visit the detailed CPAN module installation guide.