NAME

Net::Azure::StorageClient - Windows Azure Storage Client

SYNOPSIS

my $StorageClient = Net::Azure::StorageClient->new(
                                  type => 'Blob',
                                  account_name => $you_account_name,
                                  primary_access_key => $your_primary_access_key,
                                  [ protocol => 'https', ]
                                  [ api_version => '2012-02-12', ] );

METHODS

sign

Specifying the authorization header to HTTP::Request object. http://msdn.microsoft.com/en-us/library/dd179428.aspx

my $req = new HTTP::Request( 'GET', $url );
$req = $StorageClient->sign( $req, $params );

request

Specifying the authorization header and send request.

# Specifying $url or $path, Send GET request.

my $api = '/path/to/api?foo=bar';
my $type = $blobService->{ type }; # 'blob'
my $account = $blobService->{ account_name };
my $protocol = $blobService->{ protocol };
my $url = "${protocol}://${account}.${type}.core.windows.net/${api}";
my $res = $StorageClient->request( 'GET', $url );

# Request with custom http headers and request body. Send POST request.
my $params = { 
               headers => { 'x-ms-foo' => 'bar', },
               body => $request_body,
             };
my $res = $StorageClient->request( 'PUT', $url, $params );

# return HTTP::Response object.

get

Specifying the authorization header and send 'GET' request.

put

Specifying the authorization header and send 'PUT' request.

Specifying the authorization header and send 'HEAD' request.

delete

Specifying the authorization header and send 'DELETE' request.

post

Specifying the authorization header and send 'POST' request.

AUTHOR

Junnama Noda <junnama@alfasado.jp>

COPYRIGHT

Copyright (C) 2013, Junnama Noda.

LICENSE

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