mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-11 13:40:07 +00:00
Implement and test --check-spool. Make Mock/UserAgent save put and post data in an array. Make Percona/WebAPI/Client accept ready-made text resources, for multi-part resources.
This commit is contained in:
@@ -31,8 +31,8 @@ sub new {
|
||||
put => [],
|
||||
},
|
||||
content => {
|
||||
post => undef,
|
||||
put => undef,
|
||||
post => [],
|
||||
put => [],
|
||||
},
|
||||
};
|
||||
return bless $self, $class;
|
||||
@@ -42,7 +42,7 @@ sub request {
|
||||
my ($self, $req) = @_;
|
||||
my $type = lc($req->method);
|
||||
if ( $type eq 'post' || $type eq 'put' ) {
|
||||
$self->{content}->{$type} = $req->content;
|
||||
push @{$self->{content}->{$type}}, $req->content;
|
||||
}
|
||||
my $r = shift @{$self->{responses}->{$type}};
|
||||
my $c = $self->{encode}->($r->{content});
|
||||
|
Reference in New Issue
Block a user