Hi, 

I had another question.
Currently in my perl script I am invoking a servlet URL and passing few 
parameters to the servlet. As shown below:

my $req = new HTTP::Request POST => 
"$hostName/CPIWS/servlet/cat.cis.psd.sis.authoring.periodicals.client.scheduler.SendPDFDetailsTask";
$req->content_type('application/x-www-form-urlencoded');
$req->content("appAccName=$appAccName&appAccPwd=$appAccPwd&userName=$username&ieCntrlNo=$ieControlNo&pdfPath=$pdfPath");

Now, I also need to pass a PDF document to my servlet. 
How can I do that?
Any help is appreciated.

Thanks,
Pratima.

----- Original Message ----
From: Kevin Philp <[EMAIL PROTECTED]>
To: prats <[EMAIL PROTECTED]>
Cc: libwww@perl.org
Sent: Tuesday, 11 March, 2008 4:09:30 AM
Subject: Re: query reg https protocol

Pratima,
Not sure what has happened but I tried the following and it worked fine. 
https://www.example.com doesn't return anything when I tried - maybe 
that is the problem?

#!/usr/bin/perl

use warnings;
use strict;
use LWP::UserAgent;

my $ua  = LWP::UserAgent->new;
my $req = HTTP::Request->new('GET', 'https://www.cybercolloids.net');
my $res = $ua->request($req);
print $res->content, "\n";


prats wrote:
>  Hi, 
>
> I am trying to invoke https url using perl.
> I ran the below sample code.
>
>  use LWP::UserAgent;
>  my $ua  = LWP::UserAgent->new;
>  my $req = HTTP::Request->new('GET', 'https://www.example.com/');
>  my $res = $ua->request($req);
>  print $res->content, "\n";
>
> And i got the following error: (sample2 is my file name)
> [1] + Done(139) sample2
>  5764  Segmentation violation  sample2
>
> Any help is appreciated.
>
> Thanks,
> Pratima.
>
>
>      Did you know? You can CHAT without downloading messenger. Go to 
> http://in.messenger.yahoo.com/webmessengerpromo..php/ 
>
>
>
>  


      Get your domain and website for less than Rs.100/month*. Go to 
http://in.business.yahoo.com/

Reply via email to