but it fails every time.
How does it fail?
How can I make the route call itself?
I think you did
$ lwp-request -UuSsEe "http://localhost/add_news?offset=2" GET http://localhost/add_news?offset=2 User-Agent: lwp-request/6.03 libwww-perl/6.05 302 Found Connection: keep-alive Date: Wed, 19 Jun 2013 04:13:40 GMT Location: http://localhost/add_news?offset=12 Server: Mojolicious (Perl) Content-Length: 0 Client-Date: Wed, 19 Jun 2013 04:13:40 GMT Client-Peer: 127.0.0.1:80 Client-Response-Num: 1 GET http://localhost/add_news?offset=12 User-Agent: lwp-request/6.03 libwww-perl/6.05 200 OK Connection: keep-alive Date: Wed, 19 Jun 2013 04:13:40 GMT Server: Mojolicious (Perl) Content-Length: 12 Content-Type: text/html;charset=UTF-8 Client-Date: Wed, 19 Jun 2013 04:13:40 GMT Client-Peer: 127.0.0.1:80 Client-Response-Num: 1 offset = 12 $ lwp-request -UuSsEe "http://localhost/add_news?offset=3000" GET http://localhost/add_news?offset=3000 User-Agent: lwp-request/6.03 libwww-perl/6.05 200 OK Connection: keep-alive Date: Wed, 19 Jun 2013 04:13:50 GMT Server: Mojolicious (Perl) Content-Length: 14 Content-Type: text/html;charset=UTF-8 Client-Date: Wed, 19 Jun 2013 04:13:50 GMT Client-Peer: 127.0.0.1:80 Client-Response-Num: 1 offset = 3000
[Tue Jun 18 21:13:39 2013] [info] Listening at "http://localhost:80/". Server available at http://localhost:80/. [Tue Jun 18 21:13:40 2013] [debug] Your secret passphrase needs to be +changed!!! [Tue Jun 18 21:13:40 2013] [debug] GET "/add_news". [Tue Jun 18 21:13:40 2013] [debug] Routing to a callback. [Tue Jun 18 21:13:40 2013] [debug] 302 Found (0.001987s, 503.271/s). [Tue Jun 18 21:13:40 2013] [debug] GET "/add_news". [Tue Jun 18 21:13:40 2013] [debug] Routing to a callback. [Tue Jun 18 21:13:40 2013] [debug] 200 OK (0.000847s, 1180.638/s). [Tue Jun 18 21:13:50 2013] [debug] GET "/add_news". [Tue Jun 18 21:13:50 2013] [debug] Routing to a callback. [Tue Jun 18 21:13:50 2013] [debug] 200 OK (0.000711s, 1406.470/s).
In reply to Re: Mojolicious and calling current route
by Anonymous Monk
in thread Mojolicious and calling current route
by onelander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |