http
我用一个http类GenericHTTPClient,各位高手,谁用过?
我这szURL这个值传什么啊?
GenericHTTPClient *m_pClient;
bool BConect = m_pClient->Connect("http://10.1.10.167:8080/dcsportal");
if (BConect==TRUE)
{
CString szURL;
szURL.Format("%s","");
if (m_pClient->Request(szURL))
{
LPCTSTR szHTML = m_pClient->QueryHTTPResponse();
}
else
{
LPVOID lpMsgBuffer;
DWORD dwRet=FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
m_pClient->GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
reinterpret_cast<LPTSTR>(&lpMsgBuffer),
0,
NULL);
MessageBox( reinterpret_cast<LPTSTR>(lpMsgBuffer), "ERROR", MB_OK);
LocalFree(lpMsgBuffer);
}
m_pClient->Close();
}
else
{
AfxMessageBox("connct error");
}