projects
/
working
/
NCIPServer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b6a308
)
Trying to handle posts with no parameters better in the Dancer app
author
Chris Cormack
<chrisc@catalyst.net.nz>
Mon, 3 Mar 2014 19:36:21 +0000
(08:36 +1300)
committer
Chris Cormack
<chrisc@catalyst.net.nz>
Mon, 3 Mar 2014 19:36:21 +0000
(08:36 +1300)
lib/NCIP/Dancing.pm
patch
|
blob
|
history
diff --git
a/lib/NCIP/Dancing.pm
b/lib/NCIP/Dancing.pm
index
11e8197
..
8b65bc8
100644
(file)
--- a/
lib/NCIP/Dancing.pm
+++ b/
lib/NCIP/Dancing.pm
@@
-5,11
+5,14
@@
our $VERSION = '0.1';
use NCIP;
-
-any ['get', 'post'] => '/' => sub {
+any [ 'get', 'post' ] => '/' => sub {
my $ncip = NCIP->new('t/config_sample');
- my $xml = param 'xml';
+ my $xml = param 'xml';
+ if ( request->is_post ) {
+ $xml = request->body;
+ }
my $content = $ncip->process_request($xml);
+ warn $content;
template 'main', { content => $content };
};