Overview
Features
Download
Documentation
Community
Add-Ons & Services

where and when should i set proxy requirements..

Please post support and help requests here.

where and when should i set proxy requirements..

Postby vinodkumar » 04 Jun 2014, 11:17

Hi,
I have downloaded poco lib code.I am using a client which should communicate with the server (at any time) even in proxy environment.The client is working fine in Non-proxy Environment.How and where should i set proxy details in the code.can any body plz give example..

Thanks,
vvk.
vinodkumar
 
Posts: 4
Joined: 20 May 2014, 08:01

Re: where and when should i set proxy requirements..

Postby alex » 05 Jun 2014, 03:16

Code: Select all
HTTPClientSession s("www.somehost.com");
s.setProxy("myproxyserver.local");
s.setProxyCredentials("user", "pass");
HTTPRequest request(HTTPRequest::HTTP_GET, "/someurl");
s.sendRequest(request);
HTTPResponse response;
std::istream& rs = s.receiveResponse(response);
std::ostringstream ostr;
StreamCopier::copyStream(rs, ostr);
std::cout << ostr.str() std::endl;
alex
 
Posts: 1156
Joined: 11 Jul 2006, 16:27
Location: United_States


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron