Thanks ! This worked for HTTP ! I appreciate your quick help.
how to make it work for HTTPS ?
The same code does not work for https://.......

My program has to access http urls and http urls , both..

TIA,
Prateek


On 21 Oct 2005 07:04:58 -0700, Gisle Aas <[EMAIL PROTECTED]> wrote:
> Prateek <[EMAIL PROTECTED]> writes:
>
> > $ua->proxy()
> > is not accepting username and password as parameters.
>
> Did you read the section pointed to the the URL I provided?  It says:
>
> | Some proxies also require that you send it a username/password in
> | order to let requests through. You should be able to add the
> | required header, with something like this:
> |
> |  use LWP::UserAgent;
> |
> |  $ua = LWP::UserAgent->new;
> |  $ua->proxy(['http', 'ftp'] => 'http://username:[EMAIL PROTECTED]');
> |
> |  $req = HTTP::Request->new('GET',"http://www.perl.com";);
> |
> |  $res = $ua->request($req);
> |  print $res->decoded_content if $res->is_success;
> |
> | Replace proxy.myorg.com, username and password with something
> | suitable for your site.
>
>
> > On 21 Oct 2005 05:29:42 -0700, Gisle Aas <[EMAIL PROTECTED]> wrote:
> > > Prateek <[EMAIL PROTECTED]> writes:
> > >
> > > > It seems that LWP::UserAgent does not support proxy with authentication.
> > >
> > > Proxies with authentication is supported.  See:
> > >
> > >    http://search.cpan.org/~gaas/libwww-perl-5.803/lwpcook.pod#PROXIES
>


--
-----------------------------------------------------------------
Prateek Srivastava
2003 Batch CSE
M M M Engineering College, Gorakhpur.
INDIA

Reply via email to