James Bromberger

NAME

Net::Dynect::REST::Response - A response object from a request to Dynect

SYNOPSIS

 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";

METHODS

Creating

new

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).

Attributes

job_id

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.

status

This is one of 'success', 'failure' or 'incomplete'.

msgs

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.

data

This is the data part of the message that was returned.

request_duration

This is th elengh of time, in seconds as a float, between the request being submitted, and this reponse being received.

request_time

This was the time that the corresponding request that this response was built for, was submitted to Dynect.

SEE ALSO

Net::Dynect::REST, Net::Dynect::REST::Request, Net::Dynect::REST::Response::Data, Net::Dynect::REST::Response::Msg, Net::Dynect::REST::info.

AUTHOR

James Bromberger, james@rcpt.to

COPYRIGHT AND LICENSE

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.