CHttpFile Get/Post 学习笔记

void CWinInetDlg::OnOK()
{
 CInternetSession Sess;
 CHttpConnection* HttpCon = NULL;
 CHttpFile* pFile = NULL;
 HttpCon = Sess.GetHttpConnection(_T("www.sogou.com"));
//这里的网址不能加http:// ,像这样写是错的 http://www.sogou.com/
 pFile = HttpCon->OpenRequest("GET","");
//这里的GET要大写,如果写成 Get 或者 get 都是错误的。
 pFile->SendRequest();
}

/*简单的几个函数,但是每个函数都有大量的参数等着你去学啊!*/

posted @ 2012-05-05 16:49  stma  阅读(294)  评论(0)    收藏  举报