perl_help27 has asked for the wisdom of the Perl Monks concerning the following question:
I then call this url curl -H 'Accept-Type: text/xml' http://localhost:5000/user/1 I expect it to return <data name="franck" id="1" /> But instead I am receiving this error:use Dancer2; set serializer => 'Mutable'; get '/user/:id' => sub { my $id = params->{id}; return { id => $id, name => 'frank' }; } dance;
I am running hopeless!! Any help would do. Thanks{"id" => 1,"name" => "frank"} did not pass type constraint "Value" (i +n $self->{"content"}) "Value" is defined as: (defined($_) and not ref($_)) in /usr/local +/share/perl5/Dancer2/Core/App.pm l. 1473
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dancer2 serializer mutable
by choroba (Cardinal) on Nov 08, 2018 at 21:22 UTC | |
by perl_help27 (Acolyte) on Nov 08, 2018 at 22:20 UTC | |
by choroba (Cardinal) on Nov 08, 2018 at 22:25 UTC | |
by perl_help27 (Acolyte) on Nov 08, 2018 at 22:29 UTC | |
|
Re: Dancer2 serializer mutable
by MrCromeDome (Deacon) on Nov 14, 2018 at 22:57 UTC | |
by Your Mother (Archbishop) on Nov 14, 2018 at 23:08 UTC |