22 Star 67 Fork 23

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;
}
C++
1
https://gitee.com/xiaozhuai/cxxurl.git
git@gitee.com:xiaozhuai/cxxurl.git
xiaozhuai
cxxurl
cxxurl
master

搜索帮助