1 Star 0 Fork 23

northqd/cxxurl

forked from xiaozhuai/cxxurl 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
example_without_request_builder.cpp 615 Bytes
一键复制 编辑 原始数据 按行查看 历史
/**
* @author : xiaozhuai
* @date : 17/1/5
*/
#include <iostream>
#include <sstream>
#include <cxxurl/cxxurl_all.h>
using namespace std;
using namespace CXXUrl;
int main(int argc, char** argv){
ostringstream contentOutput;
Request request;
request.setUrl("http://localhost:3000/get");
request.setFollowLocation(true);
request.setContentOutput(&contentOutput);
CURLcode res = request.get();
cout << "------------ Code ------------" << endl
<< res << endl
<< "----------- Content ----------" << endl
<< contentOutput.str() << endl
<< flush;
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/northqd2018/cxxurl.git
git@gitee.com:northqd2018/cxxurl.git
northqd2018
cxxurl
cxxurl
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385