perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christophe Boggio <embp...@thefreecat.org>
Subject Question concerning REST
Date Mon, 24 Aug 2015 17:01:59 GMT

Hello,

I am trying to implement a simple REST/JSON server in embedded perl but 
I don't understand how I can retrieve the data sent to me.

I test with this command :

curl -i -X GET -d '{"name":"john"}' http://omico.miaou/rest/notifent.html


And the following code shows nothing (apart from the %ENV stuff) :

[-
use Data::Dumper;

$req = shift;

while ( ($k,$v) = each(%fdat) ) {
         warn "$0:FDAT $k : ".Dumper($v);
}

while ( ($k,$v) = each(%udat) ) {
         warn "$0:UDAT: $k : ".Dumper($v);
}

while ( ($k,$v) = each(%ENV) ) {
         warn "$0:ENV: $k : ".Dumper($v);
}

foreach $k (@param) {
         warn "$0:param: $k ";
}

-]

Thanks for your help,

JC

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message