in reply to Re: LWP Post Question
in thread LWP Post Question

Do you suppose that there is a way to do this with post? (Not to be picky, but trying to learn the madness of both methods)... But this does actually beg the question, if the form on the web page is a post, why is get working here?

Replies are listed 'Best First'.
Re^3: LWP Post Question
by runrig (Abbot) on Jul 17, 2008 at 17:00 UTC
    The form is a POST, but the site sends back a 302, and then the browser sends a GET. Notice the contents of the browser URL box after the request...it has all the parameters in the query string of the URL. Why it does it that way, I dunno. But the answer is to just send a GET from LWP in the first place.
      So the 302 response means that it sends a Post request, but then shoots back a "get" type form. Huh... In theory though this could be done with a POST where LWP follows the "get" response if I could figure out what the right thing to pass it would be. Ok...

      Can anyone point to a POST tutorial that actual works? :) Most of the ones that I find from the Google no longer work... or my cut and paste skills are sub par (totally willing to believe as well)...

      Cheers

        No, the 302 response means 'Moved Temporarily', and that's just how this site wants to respond to your post request...there is nothing wrong with your post. Why it responds that way to a post I don't know...you'd have to ask someone in charge of the site. Or maybe someone more web savvy than me can explain why a site would want to do this...maybe to make site scraping slightly more difficult.