REST Comes to C++ in Visual Studio 2013By Paul Ballard
While the REST SDK for C++ has been around for a while on CodePlex, it’s now taking its rightful place as full member of the Visual Studio 2013 installation. Code named “Casablanca”, the REST SDK for C++ includes support for JSON serialization, asynchronous streams, as well as a PPL Task programming model. Designed to enable both client REST calls as well as the hosting of non-IIS based services, this SDK also includes a reimplementation of the HTTP Listener library.
The REST SDK for C++ is intended to be platform independent which required some customization of the PPL Tasks library to allow for use on Linux or older versions of .NET.
All the asynchronous APIs in Casablanca build on the PPL tasks library that is shipping in the next version of Visual Studio. In order to make Casablanca usable also with Visual Studio 2010 and on Linux, we have built a special version of PPL tasks and included it in the Casablanca release. In order for it peacefully co-exist with PPL, we placed the special version in a different namespace, “pplx.” — Visual C++ Team Blog
JSON support is also a key feature of the SDK, and this example from Marius Bancila’s Blog shows how to make an asynchronous REST call that returns JSON.
Creating a server listening on a specific URI is also possible using the HTTP Listener library. For an example of how to implement an HTTP Listener, you can view the Casablanca Code Plex documentation here.
About the Author
Paul Ballard is a Chief Architect specializing in large scale distributed system development and enterprise software processes. Paul has more than twenty years of development experience including being a former Microsoft MVP, a speaker at technical conferences such as Microsoft Tech-Ed and VSLive, and a published author. Prior to working on the Windows platform, he built software using a vast array of technologies including Java, Unix, C, and even OS/2.
- Top 5 New Features in Visual Studio 2012
- What’s Not New in Visual Studio 2013 – Thanks Roslyn!
- Visual Studio 2012 Update 2 Ready for Download
- New course: Introduction to Visual Studio 2010
- Microsoft Releases Visual Studio 2012 Update 1
- New Course: Visual Studio 2010 Tricks
- New course: Introducing More of Visual Studio 2010
- New course: Mastering Visual Studio 2012
- New Course: Introduction to Visual Studio 2012 – Part 2
- Microsoft Unveils New Office Developer Tools for Visual Studio 2012