从 C++ 中的 URL 获取结果
Getting a result from a URL in C++
我需要一些代码的裸露C++版本。 使用 Visual Studio 2017。
我的朋友想使用 c++ 从 URL 链接获取结果。 他稍后将编写.json解析器,然后他希望代码访问相同的URL域并获取相同结果中的URL。
我认为它必须是某种HTTP/HTTPS C++GET请求制造者功能,但我不确定。
查找此任务的可能模板,以及指向此项目任何必要库的链接。
libcurl(http://curl.haxx.se/libcurl/(绝对是一个很棒的HTTP/HTTPS客户端库,它具有所有可能的花里胡哨。
但还有其他类似:
- LibHTTP (https://www.libhttp.org/(
- 果子狸网 (https://github.com/civetweb/civetweb(
- CPP-httplib (https://github.com/yhirose/cpp-httplib(
- libwww (http://www.w3.org/Library/(
- LibHTP (https://github.com/OISF/libhtp(
- HTTP 解析器 (https://github.com/nodejs/http-parser(
已经有很多JSON解析器了。仅举几例:
- cJSON (https://github.com/DaveGamble/cJSON(
- UltraJSON (https://github.com/ultrajson/ultrajson(
- JsonCpp (https://github.com/open-source-parsers/jsoncpp(
- 卡津 (https://sourceforge.net/projects/cajun-jsonapi/(
- 适用于现代C++的 JSON (https://github.com/nlohmann/json/(
- RapidJSON (https://github.com/Tencent/rapidjson(
- 小 JSON (https://github.com/rafagafe/tiny-json(
- json.h (https://github.com/sheredom/json.h(
- json-parser (https://github.com/udp/json-parser(
- libfastjson (https://github.com/rsyslog/libfastjson(
- Liblaxjson (https://github.com/andrewrk/liblaxjson(
但是那里还有更多...
由您根据哪些标准对您很重要(例如:低占用空间、性能C++ API(进行选择。
相关文章:
- C++ 随机数生成器:尝试将结果作为向量获取,但通过制作 void 函数来执行此操作而出现错误
- C++ 获取函数在常量引用中按值返回的结果
- 从返回 std::optional of std::vector 的函数中获取结果到调用方
- 从 C++ 中的 URL 获取结果
- 如何从主.cpp中的cpp文件中获取功能结果?
- 如何从 regexp_match() 中获取结果
- 无法在 WinRT 中获取异步操作结果 (Windows::Foundation::IAsyncOperating 接口
- mysql++(mysqlpp):如何在迭代之前通过UseQueryResult使用fetch_row获取结果中的行数
- QDialog exec() 并获取结果值
- 从非线程阻塞消息框获取结果
- 如何使用 QueryPerformanceCounter 在几秒钟内获取结果
- C++执行命令行并获取结果
- C++模板方法和获取结果的设计
- 如何从服务器获取结果
- 从返回类型的函数中获取结果'void'而结果变量是输入参数之一 - C++
- 从具有可变数量模板化参数的模板化类中的特定基类获取结果
- 取消引用无效指针,然后获取结果的地址
- 在Windows上执行进程并获取结果
- 用c++运行一个进程,过滤输出,获取结果代码,同时获取系统错误
- 通过usb从控制器获取结果失败