#include <mw/chttpclienttransaction.h>
Link against: httpservice.lib
class CHttpClientTransaction : public CBase |
Protected Member Functions | |
---|---|
CHttpClientTransaction() |
In HTTP terms a single transaction is one request and its equivalent response. CHttpClientTransaction encapsulates the information for the transaction. The client transaction is associated with the client session. Client should derive from this class and implement the concrete use cases. [for ex; download, upload etc..]
IMPORT_C | CHttpClientTransaction | ( | ) | [protected] |
IMPORT_C TInt | AddRequestHeader | ( | TInt | aHeaderId, |
const THttpHeaderValueVariant & | aHeaderValue | |||
) |
IMPORT_C TInt | AddRequestHeader | ( | TInt | aHeaderId, |
const THttpHeaderValueVariant & | aHeaderValue, | |||
TInt | aParamId, | |||
const THttpHeaderValueVariant & | aParamValue | |||
) |
IMPORT_C TInt | AddRequestHeader | ( | const TDesC8 & | aHeaderName, |
const THttpHeaderValueVariant & | aHeaderValue | |||
) |
IMPORT_C TInt | AddRequestHeader | ( | const TDesC8 & | aHeaderName, |
const THttpHeaderValueVariant & | aHeaderValue, | |||
const TDesC8 & | aParamName, | |||
const THttpHeaderValueVariant & | aParamValue | |||
) |
IMPORT_C TInt | AddRequestHeader | ( | const TDesC8 & | aHeaderName, |
const TDesC8 & | aParamName, | |||
const THttpHeaderValueVariant & | aParamValue | |||
) |
IMPORT_C void | CancelRequest | ( | ) |
IMPORT_C TInt | Create | ( | CHttpService & | aClient, |
const TDesC8 & | aMethod, | |||
const TDesC8 & | aUri | |||
) |
Create the HTTP transaction by specifiying the method [GET, POST etc..] and a URI
Parameters | |
---|---|
aClient | - CHttpService instance |
aMethod | - HTTP method. [GET, POST etc...] |
aUri | - URI |
IMPORT_C void | DisablePipelining | ( | ) |
Disable the pipelining for this transaction. The transaction will be send on a free TCP connection and no other transactions will be send via that TCP connection till the response for this transaction is received
void | OnCompletion | ( | ) | [pure virtual] |
void | OnError | ( | TInt | aError | ) | [pure virtual] |
IMPORT_C TBool | OnRedirection | ( | ) | [virtual] |
IMPORT_C void | OnWarning | ( | TInt | aWarning | ) | [virtual] |
IMPORT_C THttpHeaderElementIterator | ResponseHeader | ( | TInt | aHeaderId | ) |
IMPORT_C THttpHeaderElementIterator | ResponseHeader | ( | const TDesC8 & | aHeaderName | ) |
IMPORT_C THttpHeaderIterator | ResponseHeaders | ( | ) | const |
IMPORT_C TInt | SendRequest | ( | ) |
IMPORT_C TInt | SetContentSink | ( | RFile & | aFile | ) |
Set the static HTTP content sink
Parameters | |
---|---|
aFile | - An opened file |
IMPORT_C TInt | SetContentSource | ( | RFile & | aFile | ) |
Set the static HTTP content source.
Parameters | |
---|---|
aFile | - An opened file |
IMPORT_C void | SetNoRetry | ( | ) |
Disable automatic retry on a TCP connection failure. On TCP connection failure the error will be notified via OnError function
IMPORT_C void | SetRequestTimeout | ( | TInt | aValue | ) |
Set the HTTP request timeout. If the HTTP request didn't send in the specified time OnError will be called with an error code
Parameters | |
---|---|
aValue | - Request timeout value |
IMPORT_C void | SetResponseTimeout | ( | TInt | aValue | ) |
Set the HTTP response timeout. If the HTTP response didn't arrive in the specified time OnError will be called with an error code