Categories: Technical Solution | Symbian C++ | Networking | HTTP | S60 2nd Edition | S60 3rd Edition | Series 80 2nd Edition
This page was last modified 08:29, 14 November 2007.
TSS000203 - Using the HTTP Client API with RConnection
From Forum Nokia Wiki
| Subject | Using the HTTP Client API with RConnection | TSS000203 |
| Platform(s) | S60 2nd Edition Series 80 2nd Edition | |
| Category | Symbian C++ | |
| Subcategory | Networking | |
| Description | If you use the HTTP Client API, there are no chances to specify connection preferences. The default preference is to show the IAP selection dialog. However, it is more user-friendly that the IAP is selected only once by the user. The solution is to create a connection using RConnection, where you can define connection preferences as you like. Then you can attach a HTTP session to the connection as shown before. --- User::LeaveIfError(iSocketServ.Connect()); User::LeaveIfError(iConnection.Open(iSocketServ)); iHttpSession.OpenL(); // Initiate connection iConnection.Start(iStatus); //... RHTTPConnectionInfo connInfo = iHttpSession.ConnectionInfo(); RStringPool pool = iHttpSession.StringPool(); // Attach to socket server connInfo.SetPropertyL(pool.StringF(HTTP::EHttpSocketServ, RHTTPSession::GetTable()), THTTPHdrVal(iSocketServ.Handle())); // Attach to connection<br>TInt connPtr = REINTERPRET_CAST(TInt, &iConnection); connInfo.SetPropertyL(pool.StringF(HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr)); // Open transaction... iHttpTrans = iHttpSession.OpenTransactionL(iUri, *this, pool.StringF(HTTP::EGET, RHTTPSession::GetTable())); RHTTPHeaders hdr = iHttpTrans.Request().GetHeaderCollection(); //... | |
| Creation date | April 7, 2005 | |
| Last modified | - | |
| Related Discussions | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Correct way of cancelling RConnection::Start() | bjoto | General Symbian C++ | 1 | 2007-03-22 15:13 |
| Downloading a Binary File using HTTP GET | razas | Symbian Networking & Messaging | 8 | 2007-08-31 19:53 |
| gprs example | silviuccia | Symbian Networking & Messaging | 2 | 2007-10-29 16:29 |
| How to create Http Connection by specifying the client port? | SYTDeath | Mobile Java Networking & Messaging & Security | 6 | 2008-01-09 18:35 |
| http client can not work? | JackSu | General Symbian C++ | 1 | 2007-07-23 09:59 |

