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.5 Migrating from RWIHttpReply to RWHttpReply

RWIHttpReply is deprecated and has been replaced by RWHttpReply. The APIs are identical, except for how they are used to retrieve the body of a reply. RWIHttpReply returns a portal that can be used to read the remainder of the reply from the underlying network socket. RWHttpReply returns a simple RWCString that contains the body of the reply.


If you are using a custom handler to read the body of the message, the body is not available through this method. See Section 5.4.2, "Specifying a Custom Message-Body Handler," for more information about using a custom body handler with the HTTP/1.1 classes.

In order to migrate to the new HTTP/1.1 classes, you need to modify how you access the RWHttpReply object returned from a RWHttpClient or RWHttpAgent. For example, the following code extracts a body into a RWCString.

//1

Gets the portal associated with the reply object.

//2

Loops over the portal extracting parts of the body until the entire body is retrieved. Appends each part of the body to the RWCString body.

Under the new HTTP/1.1 architecture, the code is as follows:

//1

Extracts the already processed body data and stores it in the RWCString body.



Previous fileTop of DocumentContentsIndex pageNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.