The documentation has a very clear description on how redirects are handled, and how you can make it follow redirects on POST requests.
I don't know how to formulate it in a better way than the documentation, so I referain from doing it.
After reading the documentation, is there anything that's still not clear to you?
Perl 6 - links to (nearly) everything that is Perl 6.
| [reply] |
| [reply] |
Hi,
I added push @{$browser->requests_redirectable }, 'POST';
before making request.
Now I am getting 404 Not Found.
| [reply] [d/l] |
Which means that the page redirected you to a non-existing page. Either the server-sided script is broken, or you haven't provided the same information that you normally would if you submitted the form in your browser.
Or there's something different with cookie-handling or so.
The easiest way to find out is to do the same request once in a browser, and once in a script, and record the HTTP headers (both request and response) with a tool like wireshark, and then compare them.
Perl 6 - links to (nearly) everything that is Perl 6.
| [reply] |
| [reply] |