Hi Hossman,
I know that the request was successful that is why I got status code 200. I want to get the content so that I can parse the same. I will show the alternative to this one that I wrote using Win32::OLE. This uses msxml2.serverxmlhttp.
sub GetContent{
my($lstrURL)=@_;
$testURL=Variant(VT_BSTR,$lstrURL);
my $lobjXML=Win32::OLE->new('MSXML2.ServerXMLHTTP');
#my $lobjXML=Win32::OLE->new('WinHttp.WinHttpRequest.5.1') or die "can
+not create: $!";
$lobjXML->open("GET",$testURL,false);
#$lobjXML->SetClientCertificate("Enterprise Trust\\Local Computer");
$lobjXML->send;
#print $lobjXML->GetALLResponseHeaders;
if($lobjXML->status==200){
#print $lobjXML->Status ,"\n";
return $lobjXML->ResponseText;
}
else{
return $lobjXML->status,"\n";
#print $lobjXML->ResponseText;
}
undef $lobjXML;
}
This piece of code works fine and fetches content. But I cannot port this on a linux box. That is why I want the whole thing to work using LWP. My requirement is to parse the content which I get as response to HTTPS request. Thanks a lot for the response.
Regards,
Binu |