[Rest sdk] C ++ rest sdk (Casablanca)

Source: Internet
Author: User

I have been worried that C ++ does not have an easy-to-use http library, but curl is a common concern. I have tried it before and blocked the design. Each thread can only have one handle .. In short, I think it is not easy to use.

Today, I happened to find a Microsoft Open-Source Project, Casablanca. It feels great to try it out. It uses the currently cutting-edge C ++ 11 standard and writes the code as a word: Cool!


To use such an avant-garde library, VS is recommended to be above 2012. It seems that version 2010 was useless before.

Check whether you have installed the NuGet package manager. If not, install it first.


Then go to the installation package Management Console




Enter the installation command "install-package cpprestsdk"




After a moment, the latest rest sdk is installed. The installation directory is "C: \ Program Files (x86) \ Microsoft SDKs \ Cpp rest sdk for Visual Studio 2013"

Create a project and introduce the header file and lib file.


# Include "stdafx. h "# include <iostream> # include 

Execution result




Ps: C ++ 11 auto is really a good thing !? No longer afraid of the smelly and long names!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.