line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::DS::SOP::Auth::V1_1::Request::PUT; |
2
|
3
|
|
|
3
|
|
804
|
use strict; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
83
|
|
3
|
3
|
|
|
3
|
|
16
|
use warnings; |
|
3
|
|
|
|
|
17
|
|
|
3
|
|
|
|
|
62
|
|
4
|
3
|
|
|
3
|
|
13
|
use Carp (); |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
49
|
|
5
|
3
|
|
|
3
|
|
574
|
use HTTP::Request::Common qw(PUT); |
|
3
|
|
|
|
|
19181
|
|
|
3
|
|
|
|
|
191
|
|
6
|
3
|
|
|
3
|
|
21
|
use WebService::DS::SOP::Auth::V1_1::Util qw(create_signature); |
|
3
|
|
|
|
|
10
|
|
|
3
|
|
|
|
|
404
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub create_request { |
9
|
4
|
|
|
4
|
1
|
8691
|
my ($class, $uri, $params, $app_secret) = @_; |
10
|
|
|
|
|
|
|
|
11
|
4
|
100
|
|
|
|
39
|
Carp::croak('Missing required parameter: time') if not $params->{time}; |
12
|
3
|
100
|
|
|
|
18
|
Carp::croak('Missing app_secret') if not $app_secret; |
13
|
|
|
|
|
|
|
|
14
|
2
|
|
|
|
|
18
|
PUT $uri => { %$params, sig => create_signature($params, $app_secret), }; |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=encoding utf-8 |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
WebService::DS::SOP::Auth::V1_1::Request::PUT |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
To create a valid L<HTTP::Request> object for C<PUT> request with content type C<application/x-www-form-urlencoded>. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 FUNCTIONS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 $class->create_request( URI $uri, Hash $params, Str $app_secret ) returns HTTP::Request |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Returns L<HTTP::Request> object for a PUT request with content-type C<application/x-www-form-urlencoded> |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 LICENSE |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Copyright (C) dataSpring, Inc. |
40
|
|
|
|
|
|
|
Copyright (C) Research Panel Asia, Inc. |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
43
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 AUTHOR |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
yowcow E<lt>yoko.oyama [ at ] d8aspring.comE<gt> |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|