1、函数调用
CString URL ="http://ip:8080/XXXX/Register";
CString para = "username=&password=123456";
CString result;
PostContent(URL, para, result);
2、头文件(调用函数实现)post.h
#include "afxinet.h"
#include <string>
/* 发送post请求
第一个参数为URL头
第二个参数为要post表单的内容
第三个参数用于保存页面返回的信息
第四个参数用于记录日志
*/
bool PostContent(CString strUrl, const CString&strPara, CString &strContent)
{
try{
boolbRet = false;
CSt