WEB开发网
开发学院手机开发Symbian 开发 symbian 使用http get post方式获取网页信息 阅读

symbian 使用http get post方式获取网页信息

 2010-05-31 19:38:00 来源:WEB开发网   
核心提示:257. iObserver.ClientBodyReceived(dataChunk);//把得到的数据包写进上半部分258.259. TBuf< KInfotextBufferSize > text;260. _LIT(KBodyPartReceived, "%d bytes received

257. iObserver.ClientBodyReceived(dataChunk);//把得到的数据包写进上半部分

258.

259. TBuf< KInfotextBufferSize > text;

260. _LIT(KBodyPartReceived, "%d bytes received... ");

261. text.Format(KBodyPartReceived, dataChunk.Length());

262. iObserver.ClientEvent(text);

263. // NOTE: isLast may not be ETrue even if last data part received.

264. // (e.g. multipart response without content length field)

265. // Use EResponseComplete to reliably determine when body is completely

266. // received.

267. if (isLast)

268. {

269. _LIT(KBodyReceived,"Body received");

270. iObserver.ClientEvent(KBodyReceived);

271. }

272. // Always remember to release the body data.

273. body- >ReleaseData();

274. }

275. break;

276. case THTTPEvent::EResponseComplete:

277. {

278. // Indicates that header & body of response is completely received.

279. // No further action here needed.

280. _LIT(KTransactionComplete, "Transaction Complete");

281. iObserver.ClientEvent(KTransactionComplete);

282. }

283. break;

284. case THTTPEvent::ESucceeded:

285. {

286. // Indicates that transaction succeeded.

287. _LIT(KTransactionSuccessful, "Transaction Successful");

288. iObserver.ClientEvent(KTransactionSuccessful);//打印在下面的框中

289. // Transaction can be closed now. It's not needed anymore.

290. aTransaction.Close();

291. iRunning = EFalse;

292. }

293. break;

294. case THTTPEvent::EFailed:

295. {

296. // Transaction completed with failure.

297. _LIT(KTransactionFailed, "Transaction Failed");

298. iObserver.ClientEvent(KTransactionFailed);

上一页  3 4 5 6 7 8 9 10 11 12 13  下一页

Tags:symbian 使用 http

编辑录入:coldstar [复制链接] [打 印]
赞助商链接