Embperl internally uses CGI.pm to process "data sent to you".
Therefore it can't handle mime types other than multipart/form-data or
application/x-www-form-urlencoded.
I'm even not sure if it can handle HTTP methods other than GET and POST.

2015-08-24 19:05 GMT+02:00 Jean-Christophe Boggio <embp...@thefreecat.org>:

>
> 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-unsubscr...@perl.apache.org
> For additional commands, e-mail: embperl-h...@perl.apache.org
>
>


-- 
-- 
mit freundlichem Gruß,

Frank Wesemann
Fotofinder GmbH         USt-IdNr. DE812854514
Software Entwicklung    Web: http://www.fotofinder.com/
Potsdamer Str. 96       Tel: +49 30 25 79 28 90
10785 Berlin            Fax: +49 30 25 79 28 999

Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky

Reply via email to