Net::Dynect::REST::Response - A response object from a request to Dynect
use Net::Dynect::REST; my $dynect = Net::Dynect::REST->new(user_name => $user, customer_name => $customer, password => $password); use Net::Dynect::REST::Request; my $request = Net::Dynect::REST::Request->new(operation => 'read', service => 'Zone'); $response = $dynect->execute($request); print $response . "\n"; print $response->status . "\n";
This creates a new Response object. It can optionally take the arguments (as a hash ref) of:
format => $format
The valid format of the mssage, eithe JSON, YAML, XML, or HTML.
content => $content
The decoded content from the HTTP response.
request_duration => $duration
The time (in seconds, as a float) between the request being sent, and this response being returned.
request_time => $time
The time the request was submitted to dynect (ie, this response was recieved as request_time + request_duration).
This is the job_id for a request. It may be that, if a request takes longer thana short period to process, a follow up request shoul dbe sent, with his job id, to get the eventual results.
This is one of 'success', 'failure' or 'incomplete'.
This is an array of zero or more messages that were returned. See Net::Dynect::REST::Response::Msg for details of what eachof these look like.
This is the data part of the message that was returned.
This is th elengh of time, in seconds as a float, between the request being submitted, and this reponse being received.
This was the time that the corresponding request that this response was built for, was submitted to Dynect.
Net::Dynect::REST, Net::Dynect::REST::Request, Net::Dynect::REST::Response::Data, Net::Dynect::REST::Response::Msg, Net::Dynect::REST::info.
James Bromberger, james@rcpt.to
Copyright (C) 2010 by James Bromberger
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.10.1 or, at your option, any later version of Perl 5 you may have available.
To install Net::Dynect::REST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::Dynect::REST
CPAN shell
perl -MCPAN -e shell install Net::Dynect::REST
For more information on module installation, please visit the detailed CPAN module installation guide.