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

RWHttpAgent

Module:  Internet Protocols Module   Package:  HTTP


Does not inherit

Local Index

Members

Header File

#include <rw/http/RWHttpAgent.h>

Description

RWHttpAgent handles the details of the most common HTTP requests. It calls RWHttpClient to perform these requests. RWHttpAgent uses an RWHttpClientManager to cache connections to HTTP servers, which means that requests from multiple RWHttpAgent instances can use the same underlying network connection to make requests of an HTTP server.

The default constructor creates an RWHttpAgent that uses a default, global RWHttpClientManager. For greater control, you can first create an RWHttpClientManager and then create an RWHttpAgent that uses this manager. The constructor for the manager takes parameters for the number of threads and the number of connections the manager can create, and the resulting object has methods for querying and resetting these parameters. See the RWHttpClientManager description for details.

Public Constructor

RWHttpAgent();
RWHttpAgent(RWHttpClientManager::PointerType manager);

Public Member Functions

void
addCustomHeader(const RWHttpHeaderBase& hdr);
RWTIOUResult<RWHttpReply>
executeDelete(const RWURL& url) const;
RWTIOUResult<RWHttpReply>
executeGet (const RWURL& url) const;
RWTIOUResult<RWHttpReply>
executeGetIfModifiedSince(const RWURL& url, 
                          const RWHttpDate& date) const;
RWTIOUResult<RWHttpReply>
executeGetRange(const RWURL& url, const RWHttpRange& range)
const;
RWTIOUResult<RWHttpReply>
executeGetRange(const RWURL& url, const RWHttpRange& range,
const RWHttpDate& date) const;
RWTIOUResult<RWHttpReply>
executeGetRange(const RWURL& url, const RWHttpRange& range,
const RWCString& etag) const;
RWTIOUResult<RWHttpReply>
executeHead(const RWURL& url) const;
RWTIOUResult<RWHttpReply>
executeOptions(const RWURL& url, const RWHttpRequestBody&
               body=RWHttpRequestStringBody()) const;
RWTIOUResult<RWHttpReply>
executeOptions(const RWCString& server, int port=80, 
               const RWHttpRequestBody&
               body=RWHttpRequestStringBody()) const;
RWTIOUResult<RWHttpReply>
executePost(const RWURL& url, 
            const RWHttpRequestBody& body) const;
RWTIOUResult<RWHttpReply>
executePut(const RWURL& url, 
           const RWHttpRequestBody& body) const;
RWTIOUResult<RWHttpReply>
executeServerOptions(const RWURL& url,
                     const RWHttpRequestBody& body =
                     RWHttpRequestStringBody()) const;
RWTIOUResult<RWHttpReply>
executeServerTrace(const RWURL& url) const;
RWTIOUResult<RWHttpReply>
executeTrace(const RWURL& url) const;
RWTIOUResult<RWHttpReply>
executeTrace(const RWCString& server, int port=80) const;
RWHttpClientManager&
getClientManagerInstance() const;
bool
getFollowRedirects() const;
RWCString
getFrom() const;
unsigned long
getNetworkMaxWait() const;
bool
getSendDate() const;
RWCString
getUserAgent() const;
const RWHttpHeaderList&
headers() const;
bool
removeCustomHeader(const RWHttpHeaderBase& hdr);
void
setFollowRedirects(bool b);
void
setFrom(const RWCString& from);
void
setNetworkMaxWait(unsigned long ms);
void
setSendDate(bool b);
void
setUserAgent(const RWCString& agent);


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.