RE: get http through a proxy authentication

2003-08-14 Thread NYIMI Jose (BMB)
Try

use LWP::UserAgent;
 $ua = LWP::UserAgent-new;
 $ua-proxy(['http', 'ftp'] = 'http://proxy.mydomain:port');
 $req = HTTP::Request-new('GET',http://www.perl.com;);
 $req-proxy_authorization_basic(username, password);
 $res = $ua-request($req);
 print $res-content if $res-is_success;


José.

-Original Message-
From: Darbesio Eugenio [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 5:02 PM
To: [EMAIL PROTECTED]
Subject: get http through a proxy authentication


Hi

In this code I do http request through the env proxy:

   my $user_agent = new LWP::UserAgent;
   $user_agent-agent(Mozilla/4.0);
   $user_agent-timeout($timeOut);
   $user_agent-env_proxy();   
   $page = ($user_agent-request(HTTP::Request-new(GET=$url)))-as_string;

but my proxy requests an authetication (username/password).

How can I introduce authetication in my code?

Thanks!

E.

LOQUENDO S.p.A. 
Vocal Technology and Services 
www.loquendo.it 
[EMAIL PROTECTED]  




CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons above and may 
contain confidential information. If you have received the message in error, be 
informed that any use of the content hereof is prohibited. Please return it 
immediately to the sender and delete the message. Should you have any questions, 
please contact us by replying to [EMAIL PROTECTED] Thank you 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: get http through a proxy authentication

2003-08-08 Thread Darbesio Eugenio
Jose`, your suggestion works fine. Problem solved.

Thanks a lot.

E.

-Original Message-
From: NYIMI Jose (BMB) [mailto:[EMAIL PROTECTED]
Sent: giovedì 7 agosto 2003 17.20
To: Darbesio Eugenio; [EMAIL PROTECTED]
Subject: RE: get http through a proxy authentication


Try

use LWP::UserAgent;
 $ua = LWP::UserAgent-new;
 $ua-proxy(['http', 'ftp'] = 'http://proxy.mydomain:port');
 $req = HTTP::Request-new('GET',http://www.perl.com;);
 $req-proxy_authorization_basic(username, password);
 $res = $ua-request($req);
 print $res-content if $res-is_success;


José.

-Original Message-
From: Darbesio Eugenio [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 5:02 PM
To: [EMAIL PROTECTED]
Subject: get http through a proxy authentication


Hi

In this code I do http request through the env proxy:

   my $user_agent = new LWP::UserAgent;
   $user_agent-agent(Mozilla/4.0);
   $user_agent-timeout($timeOut);
   $user_agent-env_proxy();   
   $page = ($user_agent-request(HTTP::Request-new(GET=$url)))-as_string;

but my proxy requests an authetication (username/password).

How can I introduce authetication in my code?

Thanks!

E.

LOQUENDO S.p.A. 
Vocal Technology and Services 
www.loquendo.it 
[EMAIL PROTECTED]  




CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons above and may 
contain confidential information. If you have received the message in error, be 
informed that any use of the content hereof is prohibited. Please return it 
immediately to the sender and delete the message. Should you have any questions, 
please contact us by replying to [EMAIL PROTECTED] Thank you 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.




CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons
above and may contain confidential information. If you have received
the message in error, be informed that any use of the content hereof
is prohibited. Please return it immediately to the sender and delete
the message. Should you have any questions, please contact us by
replying to [EMAIL PROTECTED] Thank you


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: get http through a proxy authentication

2003-08-07 Thread NYIMI Jose (BMB)
For more info check this:
http://search.cpan.org/author/GAAS/libwww-perl-5.69/lwpcook.pod#PROXIES

José.

-Original Message-
From: Darbesio Eugenio [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 07, 2003 5:02 PM
To: [EMAIL PROTECTED]
Subject: get http through a proxy authentication


Hi

In this code I do http request through the env proxy:

   my $user_agent = new LWP::UserAgent;
   $user_agent-agent(Mozilla/4.0);
   $user_agent-timeout($timeOut);
   $user_agent-env_proxy();   
   $page = ($user_agent-request(HTTP::Request-new(GET=$url)))-as_string;

but my proxy requests an authetication (username/password).

How can I introduce authetication in my code?

Thanks!

E.

LOQUENDO S.p.A. 
Vocal Technology and Services 
www.loquendo.it 
[EMAIL PROTECTED]  




CONFIDENTIALITY NOTICE
This message and its attachments are addressed solely to the persons above and may 
contain confidential information. If you have received the message in error, be 
informed that any use of the content hereof is prohibited. Please return it 
immediately to the sender and delete the message. Should you have any questions, 
please contact us by replying to [EMAIL PROTECTED] Thank you 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]