推荐星级:
- 1
- 2
- 3
- 4
- 5
纯C++的Socket访问Http封装类
资料介绍
纯C++的Socket 访问Http封装类纯C++的Socket访问Http封装类
1.项目中要使用c++++来访问Web服务器,从网上找了个C++的封装类,其中调用了MFC,在VC2005上用能用,但是移植到VC2003就出问题了,干脆修改成了纯C++的,不敢独享,share之。
2.以下是调用方法:
1.#include"stdafx.h"2.#include<iostream>
3.#include<string>
4.#include"http\request.h"
5.
6.using namespace std;
8.int tmain(int argc,_TCHAR*argv[])
10.Request myRequest;//初始化类11.string sHeaderSend;//定义http头12.string sleaderReceive;//返回头13.string sMessage="";//返回页面内容14.bool IsPost=false;//是否Post提交
部分文件列表
文件名 | 大小 |
纯C++的Socket访问Http封装类.pdf | 479K |
全部评论(0)