Changing method during redirect?
If in a POST request I call redirect '/' then Dancer2 will create a POST request to '/'. Is it possible to redirect to a different method (e.g. a GET request to '/')? Gabor
You probably need to issue a different redirect code, depending on the semantics you want and whether you want to support HTTP/1.0. See the RFC: https://tools.ietf.org/html/rfc2616#section-10.3 David On Thu, Oct 24, 2013 at 10:53 AM, Gabor Szabo <gabor@szabgab.com> wrote:
If in a POST request I call redirect '/' then Dancer2 will create a POST request to '/'.
Is it possible to redirect to a different method (e.g. a GET request to '/')?
Gabor _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- David Golden <xdg@xdg.me> Take back your inbox! → http://www.bunchmail.com/ Twitter/IRC: @xdg
Thanks. After reading part of the RFC, it seems I need to use 303 redirection and indeed redirect '/', 303; worked fine. Gabor
participants (2)
-
David Golden -
Gabor Szabo