If your application must first connect to a firewall machine, and have the firewall to forward HTTP requests, you may be stymied at first. However you can easily do this in a manner similar to the code snippet below. The trick is to realize that the "path" part of an HTTP request can include the full URL.
RWIHttpClient hc(RWIHttpVersion_1_0()); RWCString real("www.goodlocation.com/goodstuff"); RWCString firewall("firewall.worried.org"); #if defined(HAS_FIREWALL) hc.connect(firewall,firewallPortNumber); // ... maybe other stuff here hc.execute(RWHttpGet("http://www.goodlocation.com/goodstuff")); #else // no firewall hc.connect(real); // ... maybe other stuff here hc.execute(RWHttpGet("/goodstuff"); #endif
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.