FakeHttpConnection Class Reference

Fake HTTPConnection, to test the HttpUploader::upload(). More...

Inherits HttpConnection.

List of all members.

Public Member Functions

 FakeHttpConnection (const char *user_agent, int status)
int open (const StringBuffer &url, RequestMethod method=MethodPost)
int close ()
 This method closes this connection.
int request (InputStream &data, OutputStream &response)
 Sends the request.

Private Attributes

int responseStatus


Detailed Description

Fake HTTPConnection, to test the HttpUploader::upload().

Member Function Documentation

int FakeHttpConnection::close (  )  [inline, virtual]

This method closes this connection.

It does not close the corresponding input and output stream which need to be closed separately (if they were previously opened)

Implements AbstractHttpConnection.

int FakeHttpConnection::request ( InputStream &  data,
OutputStream &  response 
) [inline, virtual]

Sends the request.

The method used must be set via setRequestMethod (default = POST). The headers/authentication must already be set before calling this method (otherwise none is used).

Parameters:
data the data to be sent
response the response returned
Returns:
the HTTP Status Code returned or -1 if no status code can be discerned.

Implements AbstractHttpConnection.

References AbstractHttpConnection::requestHeaders, and AbstractHttpConnection::responseHeaders.


The documentation for this class was generated from the following file:

Generated on Tue Dec 21 15:16:20 2010 for Funambol Outlook Plug-in Library by  doxygen 1.5.7.1