Inherits HttpConnection.
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 |
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).
data | the data to be sent | |
response | the response returned |
Implements AbstractHttpConnection.
References AbstractHttpConnection::requestHeaders, and AbstractHttpConnection::responseHeaders.