in reply to LWP HTTP Request POST being sent in two packets
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' ] );
|
|---|