Hi,
I have written a perl script to hit one external url using proxy to get a session id. But i am getting the "400 Bad Request" error
I am attaching the code below.
**************************************************
#!/app/teamsite/iw-home/iw-perl/bin/iwperl
use LWP::UserAgent;
use HTTP::Request;
my $uri = '
https://abc.efg.com:443/cgi-bin/GetSessionId.cgi?cmd=get_session_id&uid=7777777&uip=1.1.1.1&gid=am1';my $ua = LWP::UserAgent->new;
$ua->proxy(['http','https'], '
http://myproxy.abc.com:8080');$ua->credentials(
'abc.efg.com:443',
'Server',
'am1' => '12sddr3'
);
my $request = HTTP::Request->new('GET', $uri);
my $response = $ua->request($request);
print %$response,"\nResp\n";
if ($response->is_success) {
print "Success\n";
} else {
print "Failed to GET '$uri': ", $response->status_line, "\n";
}
***********************************************
When I hit the url from my local browser it is working fine.
I am running this on solaris 8 box and using the perl installation for Teamsite 6.5
Anyone have any idea why this is happening?
Thanks in Advance
Deepu