A Question about ChttpFile
-
I'm learning VC++/MFC programming. I want post data to a webserver by http protocol,but it is errors Source followed: CString strHeaders =_T("Content-Type: application/x-www-form-urlencoded"); // URL-encoded form variables - // name = "John Doe", userid = "hithere", other = "P&Q" CString strFormData = _T("t=abcd"); CInternetSession session; CHttpConnection* pConnection = session.GetHttpConnection(_T("http://127.0.0.1/test.asp")); CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST,_T("http://127.0.0.1/test.asp")); why the pFile is null? 6对9说:好好的,打什么倒立。0对8讲:胖就胖一点了,系什么腰带。7对2讲,别跪了,跪死了也不嫁给你。5对3讲:哼,再隆胸也是假的
-
I'm learning VC++/MFC programming. I want post data to a webserver by http protocol,but it is errors Source followed: CString strHeaders =_T("Content-Type: application/x-www-form-urlencoded"); // URL-encoded form variables - // name = "John Doe", userid = "hithere", other = "P&Q" CString strFormData = _T("t=abcd"); CInternetSession session; CHttpConnection* pConnection = session.GetHttpConnection(_T("http://127.0.0.1/test.asp")); CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST,_T("http://127.0.0.1/test.asp")); why the pFile is null? 6对9说:好好的,打什么倒立。0对8讲:胖就胖一点了,系什么腰带。7对2讲,别跪了,跪死了也不嫁给你。5对3讲:哼,再隆胸也是假的
lxdff wrote: session.GetHttpConnection(_T("http://127.0.0.1/test.asp")); GetHttpConnection requires a server, not a file. Try session.GetHttpConnection(_T("127.0.0.1")); Joel Lucsy (jjlucsy@ameritech.net)
-
I'm learning VC++/MFC programming. I want post data to a webserver by http protocol,but it is errors Source followed: CString strHeaders =_T("Content-Type: application/x-www-form-urlencoded"); // URL-encoded form variables - // name = "John Doe", userid = "hithere", other = "P&Q" CString strFormData = _T("t=abcd"); CInternetSession session; CHttpConnection* pConnection = session.GetHttpConnection(_T("http://127.0.0.1/test.asp")); CHttpFile* pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_POST,_T("http://127.0.0.1/test.asp")); why the pFile is null? 6对9说:好好的,打什么倒立。0对8讲:胖就胖一点了,系什么腰带。7对2讲,别跪了,跪死了也不嫁给你。5对3讲:哼,再隆胸也是假的
兄台是那里人呀