in reply to Force LWP to connect to a proxy for HTTP::Request POST

But my program screams!

What does it scream?

How to implement connecting to a proxy with "POST" as opposed to "GET"?

There is nothing special to implement. However, if your proxy for some reason denies POST or doesn't implement POST, then you need a new proxy.

  • Comment on Re: Force LWP to connect to a proxy for HTTP::Request POST

Replies are listed 'Best First'.
Re^2: Force LWP to connect to a proxy for HTTP::Request POST
by xcalibur (Initiate) on Mar 27, 2010 at 00:22 UTC

    It screams only for the "POST" but works fine with the "GET"

    500 Can't connect to ofgfw1.owfg.com:8080 (Bad hostname 'ofgfw1.owfg.com')

    500 Can't connect to ofgfw1.owfg.com:8080 (Bad hostname 'ofgfw1.owfg.com')/

    Content-Type: text/plain

    Client-Date: Sat, 27 Mar 2010 00:18:14 GMT

    Client-Warning: Internal response

    The weird thing is that it works fine for "GET"

      ... $req = HTTP::Request->new(POST => 'mysite.com/user_login.php'); ...

      It seems you're not supplying a protocol here. Maybe that's the cause of your error. Personally, I would try with WWW::Mechanize and use something like the Mozilla Live HTTP Headers and Wireshark to inspect and compare the network traffic sent by the browser and your script.

        I am supplying a protocol. The script works fine (without requiring a proxy) from a LAN. But I need to run it outside the LAN where I need the proxy to connect.