BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Casablanca's C++ SDK Whitelisted for Open Source

by Jeff Martin on Mar 01, 2013 |

Microsoft's C++ REST SDK, codenamed Casablanca has been open sourced under the Apache license. It is described as a "a Microsoft effort to support cloud-based client-server communication in native code using a modern asynchronous C++ API design." Breaking through the highlevel description, this offering uses C++11 to provide what Microsoft hopes is an easier way to write client-side HTTP code.

Casablanca is multi-platform, supporting Linux as well as Windows 7 and Windows 8. Microsoft developer Artur Laksberg states that support WinXP for and Vista is being developed. Another highlight is its support for asynchronous operations. Microsoft's announcement provides some examples of a file upload via HTTP and creating a JSON object to demonstrate Casablanca in action.

Both the Windows and Linux builds support the following feaures:

  • Ability to create a connection to a server via a HTTP Client, send requests and handle response.
  • Support for construction and use of Uniform Resource Identifiers (URI).
  • Constructing, parsing and serializing JSON values.
  • Asynchronously reading/writing bytes to/from an underlying medium via Streams and Stream Buffers.

There are several different Streams and Stream Buffers available: a memory based producer-consumer, files, a memory based stream backed by a STL container, raw pointer streams, and interop streams. This last type of stream allows for "...Casablanca [to provide] two sets of classes, one to give an async stream interface to an iostream, one to give an iostream interface to an async stream."

The Linux http client is somewhat limited in that it does not yet support https, proxies, or authentication, but Microsoft states these features will be part of a future release. CodePlex houses Casablanca's source code where it may be viewed online, obtained via Git, or downloaded as a Zip archive with the latest snapshot.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

PVS-Studio by Andrey Karpov

his is a good code written in a contemporary style employing capabilities of C++11. We have checked it using our static code analyzer PVS-Studio and failed to find at least one significant bug. Our respect to the Microsoft developers who have created this library! Blog post: www.viva64.com/en/b/0189/

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT