symbian 使用http get post方式获取网页信息
2010-05-31 19:38:00 来源:WEB开发网symbian里设计用http get post方式获取网页信息
需要头文件
#include < http.h >
#include < chttpformencoder.h >
#include < HttpStringConstants.h >
#include < httpRHTTPTransaction.h >
#include < httpRHTTPSession.h >
#include < httpRHTTPHeaders.h >
详细的示例代码如下
view plaincopy to clipboardprint?
1. /*
2. * ============================================================================
3. * Name : CClientEngine of ClientEngine.cpp
4. * Part of : HTTP Client Example
5. * Created : 06/20/2006 by Zengyang
6. * Version : 2.0
7. * Copyright: NetQin
8. * ============================================================================
9. */
10. #include < avkon.hrh >
11. #include < aknnotewrappers.h >
12. #include < uri8.h >
13. #include < http.h >
14. #include < chttpformencoder.h >
15. #include < HttpStringConstants.h >
16. #include < httpRHTTPTransaction.h >
17. #include < httpRHTTPSession.h >
18. #include < httpRHTTPHeaders.h >
19. #include < HTTPClientExample.rsg >
20. #include < COMMDB.H > //Communications database
21. #include < CDBPREFTABLE.H > //Connection Preferences table
22. #include < CommDbConnPref.h >
23. #include "Client.pan"
24. #include "Client.hrh"
25. #include "ClientEngine.h"
26. // Used user agent for requests
27. _LIT8(KUserAgent, "SimpleClient 1.0");
28. // This client accepts all content types.
29. // (change to e.g. "text/plain" for plain text only)
30. _LIT8(KAccept, "*/*");
更多精彩
赞助商链接