纯C++的Socket访问Http封装类.docVIP

  • 21
  • 0
  • 约1.83万字
  • 约 22页
  • 2017-03-22 发布于江苏
  • 举报
纯C的Socket访问Http封装类

纯C++的Socket访问Http封装类 纯C++的Socket访问Http封装类 1.项目中要使用c++++来访问Web服务器,从网上找了个C++的封装类,其中调用了MFC, 在VC2005上用能用,但是移植到VC2003就出问题了,干脆修改成了纯C++的,不敢独享,share之。 2.以下是调用方法: #include stdafx.h #include iostream #include string #include http/request.h using namespace std; int _tmain(int argc, _TCHAR* argv[]) { Request myRequest; //初始化类 string sHeaderSend; //定义http头 string sHeaderReceive; //返回头 string sMessage=; //返回页面内容 bool IsPost=false; //是否Post提交 int i =myRequest.SendRequest(IsPost, , sHeaderSend,

文档评论(0)

1亿VIP精品文档

相关文档