Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: LWP HTTP Request POST being sent in two packets

by Anonymous Monk
on Oct 10, 2002 at 17:48 UTC ( [id://204255]=note: print w/replies, xml ) Need Help??


in reply to LWP HTTP Request POST being sent in two packets

This is the code that is sending the headers & content in 2 different packets.
I've also tried a different version using query_form() from the URI module. With that it is all send as a single packet, but the parameters are then part of the URI and not the content. Can someone confirm if query_form should only be used with GETs?
use HTTP::Request::Common; use LWP::UserAgent; $ua = LWP::UserAgent->new; $ua->request(POST 'http://user:password@z.y.z.com/devicesave.asp', Content_Type => 'application/x-www-form-urlencoded', Referer => 'http://x.y.z.com/newdevice.asp?map=CHI.wu +p', Content => [ 'map' => 'CHI.wup', 'CreateNewDevice' => 'true', 'Title' => 'node', 'HostName' => 'node.acme.com', 'IP' => '127.0.0.1', 'PollType' => 'ICMP', 'HostType' => 'Server', 'Info1' => 'info1', 'Info2' => 'info2', 'Snmp' => '1', 'ReadComm' => 'read', 'WriteComm' => 'write', 'OID' => '', 'Logging' => '1', 'Monitoring' => '1', 'StartTime' => '0000', 'EndTime' => '2400', 'Sun' => '1', 'Mon' => '1', 'Tues' => '1', 'Wedn' => '1', 'Thur' => '1', 'Fri' => '1', 'Sat' => '1', 'PollFreq' => '1', 'TimeOut' => '5000', 'DownDep' => '0', 'UpDep' => '0', 'Notes' => '', 'end' => 'end' ] );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-20 04:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found