Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re^3: POST with LWP yields HTTP 302 Not Allowed - Too bad for me?

by perlNinny (Beadle)
on Mar 17, 2010 at 18:29 UTC ( [id://829235]=note: print w/replies, xml ) Need Help??


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

It seems now the Post office doesn't let this work anymore:

HTTP/1.1 405 Method Not Allowed
Connection: close
Date: Wed, 17 Mar 2010 18:07:28 GMT
Server: Netscape-Enterprise/6.0
Vary: Accept-Encoding
Allow: HEAD, GET
Content-Length: 124
Content-Type: text/html
Client-Date: Wed, 17 Mar 2010 18:07:27 GMT
Client-Peer: 96.16.57.188:80
Client-Response-Num: 1
Title: Method Not Allowed
  • Comment on Re^3: POST with LWP yields HTTP 302 Not Allowed - Too bad for me?

Replies are listed 'Best First'.
Re^4: POST with LWP yields HTTP 302 Not Allowed - Too bad for me?
by jdrago999 (Pilgrim) on Mar 17, 2010 at 22:50 UTC

    Try setting the "user agent" string in LWP to something else.

    eg:

    use LWP::UserAgent; use HTTP::Request::Common; my $ua = LWP::UserAgent->new(); $ua->agent( "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1)" ); my $request = POST "http://the.url/the.page", { foo => 'bar', baz => 'bux', }; my $result = $ua->request( $request ); print $result->as_string;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://829235]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-26 05:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found