我想用HttpSendRequestA函数发送请求,通过用户邮件和密码的方式以实现自动登录功能。所以我写如下代码:
char hdrs[512] ={0};
::strcat(hdrs,"Host:kacha.host1.sinodns.net");
::strcat(hdrs,"\r\n");
::strcat(hdrs,"Content-Type: application/x-www-form-urlencoded");
::strcat(hdrs,"\r\n");
::strcat(hdrs,"Content-Length: 69");
::strcat(hdrs,"\r\n");
::strcat(hdrs,"Connection: close");
::strcat(hdrs,"\r\n");
::strcat(hdrs,"\r\n");char *data = "utype=email&[email protected]&password=123456&expire=31536000";
DWORD dLength = ::strlen((char *)data);bSend = HttpSendRequestA(hHttp,
                     hdrs,
 -1L,
                     data, 
 dLength);
if(bSend == FALSE)
{
dwGetLastError = GetLastError();
MessageBox(NULL,L"error5",L"error5",MB_OK);
}可是虽然HttpSendRequestA函数执行过了,但是通过HttpQueryInfo和InternetReadFile这两个函数判断是否执行正确的时候,反馈的信息不争取。请问我是不是在函数HttpSendRequestA中写的参数值有问题 ?