[Dancer-users] cgi params via command line
Puneet Kishor
punk.kish at gmail.com
Sun Feb 27 04:03:09 CET 2011
:-)
On Saturday, February 26, 2011 at 9:00 PM, Matthew Vickers wrote:
> On 27/02/11 1:57 PM, Puneet Kishor wrote:
> > 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
> > _______________________________________________
> > Dancer-users mailing list
> > Dancer-users at perldancer.org
> > http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
> Hi Puneet
>
> Try:
>
> curl 'http://dm.local/dm.json?var=prcp&from=1980-1-1&to=1980-2-2'
Thanks.
>
>
> I suspect your shell is interpreting the ampersands and backgrounding
> the first and second portions of the URL.
>
>
> Matt
>
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
More information about the Dancer-users
mailing list