The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::Azure::StorageClient - Client for Azure Blob Storage

VERSION

version 0.6

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', ] );

NAME

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

METHODS

sign

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

my $req = HTTP::Request->new( '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 AND LICENSE

This software is copyright (c) 2020 by Junnama Noda.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

CONTRIBUTORS

  • Alexandr Ciornii <alexchorny@gmail.com>

  • Dean Hamstead <djzort@cpan.org>

  • ksasakims <gitsasa@outlook.com>

  • paulbort <paulbort@gmail.com>