I am using the WebClient example code for s60_3rd_FP1 in my application. I am trying to make several RHTTPTransactions using the same RHTTPSession, I call several following times "IssueHTTPGetL" with differents Uri´s and without waiting for the response to the previous ones, within this method I create an independent transaction for each Uri every time it is called instead of having just one global RHTTPTransaction.
But it seems not to work, when more than one transaction is submitted, the MHFRunL only receives "default" as "aEvent.iStatus".
I have read that it is possible to make several transactions within the same session. Any idea of what I have done wrong?? Thanks in advance.
void CWebClient::IssueHTTPGetL( const TDesC8& aUri )
// Parse string to URI (as defined in RFC2396)
uri.Parse( aUri );
// Get request method string for HTTP GET
RStringF method = iSession.StringPool().StringF( HTTP::EGET,
// Open transaction with previous method and parsed uri. This class will
// receive transaction events in MHFRunL and MHFRunError. RHTTPTransaction transaction;
transaction = iSession.OpenTransactionL( uri, *this, method );
// Set headers for request; user agent and accepted content type
RHTTPHeaders hdr = transaction.Request().GetHeaderCollection();
SetHeaderL( hdr, HTTP::EUserAgent, KUserAgent );
SetHeaderL( hdr, HTTP::EAccept, KAccept );
// Submit the transaction. After this the framework will give transaction
// events via MHFRunL and MHFRunError.