c++ lib 与 REST api 一起为初学者工作

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10685697/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-27 14:20:32  来源:igfitidea点击:

c++ lib to work with REST api for beginners

c++jsonrest

提问by Peter Dubec

I am going to do some things using dropbox rest api in C++ and I'm looking for an easy-to use library.

我将在 C++ 中使用 dropbox rest api 做一些事情,我正在寻找一个易于使用的库。

Does anyone know what functionality will I need? (I only have vague idea what REST api is)

有谁知道我需要什么功能?(我只有模糊的想法 REST api 是什么)

I believe I need HTTP protocol functionality and XML parsing functionality, and JSON right? What else?

我相信我需要 HTTP 协议功能和 XML 解析功能,以及 JSON,对吗?还有什么?

Which easy-to-use and easy-to-learn lib would you recommend me?

您会推荐我哪个易于使用且易于学习的库?

I found POCO C++and it seems quite easy but I didn't find any JSON functionality...

我找到了POCO C++,它看起来很简单,但我没有找到任何 JSON 功能......

回答by Sana

The C++ REST SDKmight have what you are looking for. It has a JSON parser and HTTP Client APIs that are very easy to use. You can check out the project on codeplex.

C ++ SDK REST可能有你在找什么。它有一个非常容易使用的 JSON 解析器和 HTTP 客户端 API。您可以在 codeplex 上查看该项目。

Edit - 05/2016

编辑 - 05/2016

The Microsoft C++ REST SDK project has moved to Github at Microsoft/cpprestsdkwhich says:

Microsoft C++ REST SDK 项目已移至Microsoft/cpprestsdk 的Github,其中说:

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

C++ REST SDK 是一个 Microsoft 项目,用于使用现代异步 C++ API 设计以本机代码进行基于云的客户端-服务器通信。该项目旨在帮助 C++ 开发人员连接到服务并与之交互。

The README.md has the following synopsis of what is in the SDK.

README.md 对 SDK 中的内容进行了以下概要。

Features - HTTP client/server, JSON, URI, asynchronous streams, WebSockets client, oAuth

PPL Tasks - A powerful model for composing asynchronous operations based on C++ 11 features

Platforms - Windows desktop, Windows Store, Windows Phone, Ubuntu, OS X, iOS, and Android

Support for Visual Studio 2012, 2013, and 2015 with debugger visualizers

NuGet package with binaries for Windows and Android platforms

特性 - HTTP 客户端/服务器、JSON、URI、异步流、WebSockets 客户端、oAuth

PPL Tasks - 基于 C++ 11 特性组合异步操作的强大模型

平台 - Windows 桌面、Windows 应用商店、Windows Phone、Ubuntu、OS X、iOS 和 Android

使用调试器可视化工具支持 Visual Studio 2012、2013 和 2015

带有适用于 Windows 和 Android 平台的二进制文件的 NuGet 包

回答by Sumeet

Did you have a look at ffead-cpp, it provides wonderful support for REST and SOAP services.

您是否看过ffead-cpp,它为 REST 和 SOAP 服务提供了极好的支持。