Commit | Line | Data |
8bf1f20e |
1 | package Test::Catalyst::Action::REST::Controller::DeserializeMultiPart; |
2 | use Moose; |
3 | use namespace::autoclean; |
4 | |
5 | BEGIN { extends 'Catalyst::Controller' } |
6 | |
7 | __PACKAGE__->config( |
8 | 'stash_key' => 'rest', |
9 | 'map' => { |
10 | 'text/x-yaml' => 'YAML', |
11 | 'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ], |
12 | 'text/broken' => 'Broken', |
13 | }, |
14 | ); |
15 | |
16 | sub test :Local ActionClass('DeserializeMultiPart') DeserializePart('REST') { |
17 | my ( $self, $c ) = @_; |
18 | $DB::single=1; |
19 | $c->res->output($c->req->data->{'kitty'} . '|' . $c->req->uploads->{other}->size); |
20 | } |
21 | |
22 | 1; |