使用wininet
一般流程:
1,
BOOL AFXAPI AfxParseURLEx(
LPCTSTR pstrURL,
DWORD& dwServiceType,
CString& strServer,
CString& strObject,
INTERNET_PORT& nPort,
CString& strUsername,
CString& strPassword,
DWORD dwFlags = 0
); 使用該函數解析URP
其中 strServer :The first segment of the URL following the service type.
2,
GetHttpConnection()
3,
OpenRequest()
4,
AddRequestHeaders() 通用頭 域包含請求和響應消息都支持的頭域
5,
SendRequest
6,
QueryInfo