Thanks for your reply, although I'm still misisng it. I ran the program again, went down to the line that had the "Location:" header, and copied the redirection URI into my code, which is below:

#!/opt/gnu-irix/bin/perl use strict; use HTTP::Request::Common; use LWP::UserAgent; my $ua = new LWP::UserAgent; #my $formurl = 'http://www.usps.com:80/cgi-bin/zip4/zip4inq2'; my $formurl = 'http://148.129.65.3:80/fwauthredirect148.129.65.9id0003869786'; my $formdata = [ 'Firm' => '', 'Urbanization' => '', 'Delivery Address' => '100 Southland Vlg', 'City' => '', 'State' => '', 'Zip Code' => '36079-3044', 'Submit' => 'Process' ]; print $formurl, "\n"; my $resp = $ua->request(POST $formurl, $formdata); if ($resp->is_success()) { print $resp->content(); } else { print "Problem\n\n", $resp->as_string(); }

Running the program generated a similar response:

HTTP/1.0 302 (Found) Not Allowed Location: http://148.129.65.3:80/fwauthredirect148.129.65.9id000386993 +7 Content-Length: 120 Content-Type: text/html Client-Date: Wed, 15 May 2002 15:57:42 GMT Client-Peer: 56.0.78.101:80 Your request is being redirected to :<a href="http://148.129.65.3:80/f +wauthredirect148.129.65.9id0003869937">here</a>.

It appears that I simply got redirected again. Please advise. Thanks.


In reply to Re: Re: POST with LWP yields HTTP 302 Not Allowed - Too bad for me? by Shizzle
in thread POST with LWP yields HTTP 302 Not Allowed - Too bad for me? by Shizzle

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.