Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWIHttpAgent


RWIHttpAgentRWIAgent

Module

Networking Tools: Thread-hot Internet Classes (int library)

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Member Functions

Synopsis

#include <rw/toolpro/httpa.h>
RWIHttpAgent agent("www.roguewave.com", RWIHttpVersion_1_0());

Required Libraries

thr, net, int, tls (and possibly std)

Description

RWIHttpAgent is a class that simplifies performing the most common HTTP requests. The RWIHttpClient class is used under the hood to perform these requests. RWIHttpAgent handles more of the details of the HTTP protocol than the RWIHttpClient class. However, it doesn't provide the flexibility of the client class.

RWIHttpAgent currently supports both HTTP 0.9 and HTTP 1.0 protocols. If a user attempts to initiate a transaction using an agent class of HTTP Version 0.9 and such an action is not valid or available in Version 0.9, an RWxmsg exception is thrown.

The non-default constructor of RWIHttpAgent stores connection information. The methods interact with an HTTP server by connecting, performing the requested action, and disconnecting. Multiple transactions may be performed before an RWIHttpAgent object is destroyed.

RWIHttpAgent objects are lightweight. They are implemented using the interface-implementation pattern. A handle to an implementation actually performs the protocol interaction.

Example

Public Constructors

RWIHttpAgent();
RWIHttpAgent(const RWCString& host, 
             const RWIHttpVersion& ver);

Public Member Functions

RWIOUResult<RWSocketPortal>
get(const RWCString& httpPath="/");
RWIOUResult<RWBoolean>
isNewer(const RWCString& httpPath, const RWTime& t);
RWIOUResult<RWSocketPortal>
post(const RWCString& httpPath, 
     const RWCString& postData=""); 


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.