Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Casablanca's C++ SDK Whitelisted for Open Source

Casablanca's C++ SDK Whitelisted for Open Source

This item in japanese


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.

Rate this Article


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.

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

Community comments

  • PVS-Studio

    by Andrey Karpov,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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:

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

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