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

NAME

Net::Dynect::REST::Request - A request object to supply to Dynect

SYNOPSIS

 use Net::Dynect::REST::Request;
 $request = Net::Dynect::REST::Request->new(operation => 'read', service => 'Zone', params => {zone => 'example.com'});

DESCRIPTION

The Request object in the REST interface will form the basis of the underlying HTTP request that is made to the REST server. It will format the optional parameters in one of the supported formats.

METHODS

Creating

new

This creator method will return a new Net::Dynect::REST::Request object. You may use the following arguments:

  • operation => $value

    The operation is either 'create', 'read', 'update', or 'delete' (CRUD).

  • service => $service

    The service is the end of the URI that will handle the request. The base of the URI, including hte protocol, server name and port, and a base path, is already known in the session object - your session should already be established to pass this request to be executed. Hence the service value is one of a list as documented in the manual (eg, Zone). Note this is case sensative.

  • params => {list => $value1, of => $value2, parameters => $values3);

    A reference to a hash with the set of parameters being passed to the service. The exact list of valid parameters depends upon the service being accessed; it may be a zone name, a record name, etc.

Attributes

operation

This is the operation to perform upon the service. It is one of:

  • create

  • read

  • update

  • delete

service

This is the end of the URI that will handle the REST request. There is a long list of the implemented services in the Dynect REST API manual.

format

This is the format that we will send our request in, and hope to recieve our response in. It is one of:

  • JSON

  • XML

  • YAML

  • HTML

mime_type

This returns the mime type for the "format" already selected.

params

This is a hash reference of the parameters to be supplied with the request, if any. The valid parameters depend upon the service being accessed and the operation being performed.

SEE ALSO

Net::Dynect::REST, 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.