[Dancer-users] cgi params via command line

Puneet Kishor punk.kish at gmail.com
Sun Feb 27 03:57:08 CET 2011


use Dancer::Serializer::Mutable;
use Dancer::Plugin::REST;
prepare_serializer_for_format;


[http://dm.local/dm.json?var=prcp&from=1980-1-1&to=1980-2-2] works just fine via an ajax query from the browser.

However, the following via curl fails

% curl http://dm.local/dm.json?var=prcp&from=1980-1-1&to=1980-2-2
[1] 18403
[2] 18404
punkish at Lucknow ~$<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Error 404</title>
<link rel="stylesheet" href="/css/error.css" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Error 404</h1>
<div id="content">
<h2>Page Not Found</h2><p>Sorry, this is the void.</p>
</div>
<div id="footer">
Powered by <a href="http://perldancer.org/">Dancer</a> 1.3011
</div>
</body>
</html>

What am I doing wrong?

Puneet Kishor 


More information about the Dancer-users mailing list