perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christophe Boggio <embp...@thefreecat.org>
Subject Setting status code
Date Wed, 26 Sep 2012 21:48:22 GMT
Hello,

I'm calling a page with jQuery's $.ajax() and I want it to return a 
status code (201 if ok, 400 if some parameters are missing). The goal is 
to use .done() and .fail()

I guess that's the way to go but apart when doing redirects (with 
$http_header_out('location',['/page',302]) )I don't know how to set a 
HTTP status code from embperl.

I thought exit 400 would work but it seems not. $req->status(400) does 
not exist (anymore?)

Thanks for your help.

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


Mime
View raw message