Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internet Protocols Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

A.2 Migrating from RWIHttpAgent to RWHttpAgent

RWIHttpAgent is deprecated and has been replaced by RWHttpAgent. Migrating to RWHttpAgent requires moving variables and removing lines of code.

RWHttpAgent returns more information with the request than RWIHttpAgent:

For more information about RWHttpAgent, see Section 5.3, "Using the HTTP Classes," Section 5.4, "Advanced Topics," and the Internet Protocols Module Reference Guide.

The following examples show the differences between using RWIHttpAgent and RWHttpAgent. Example 32 requests the root document of the www.roguewave.com Web site using RWIHttpAgent.

Example 32: Using RWIHttpAgent

//1Creates an RWIHttpAgent class connected to www.roguewave.com. All requests are sent as HTTP/1.0 compliant requests.
//2Requests the root document from the server. It is returned as an IOU.
//3Redeems the IOU for the RWSocketPortal, and stores it in an actual RWSocketPortal instance.
//4Loops over the portal extracting the body of the message, and stores it in the RWCString body.

Example 33 shows how to do the same task using RWHttpAgent.

Example 33: Using RWHttpAgent

//1Creates an RWHttpAgent. Connection information is not necessary because connections are created when needed.
//2Requests the root document from www.roguewave.com using an RWURL object.
//3Redeems the returned IOU for an RWHttpReply object.
//4Gets the body of the message from the RWHttpReply.


Previous fileTop of DocumentContentsIndex pageNext file

© 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.