The Wayback Machine - https://web.archive.org/web/20190322172046/https://github.com/Microsoft/cpprestsdk
Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
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.
Branch: master
Clone or download
BillyONeal Rewrite date formatting and parsing (#1076)
This overhauls the RFC 1123 and ISO 8601 parsing with bits copied from the autorest C prototype, giving more consistent behavior across platforms, and removing unintended locale dependencies. (For example, before on POSIX on a German machine we might emit Die, 19 Mär 2019 09:59:57 which would be rejected by servers)

There is a subtle breaking change in that we previously accepted a time with no date, e.g. "12:12:12Z", and this change rejects that. However, such input is not a valid ISO 8601 input, and we were crazy about how we handled it before. Before, on Windows we would fill in the date with whatever the current date is, but on POSIX we would fill in January 1, 1970. Considering this was never consistent, and considering 99.999% of internet customers are going to be using RFC 3339 which requires all the components, I've dropped that special case.

Lots of tests also added.
Latest commit f10d9f8 Mar 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode Add uri_builder::append_path_raw(...) to allow adding elements to pat… Nov 12, 2018
Build_android
Build_iOS
Release Rewrite date formatting and parsing (#1076) Mar 21, 2019
vcpkg @ c7d4696
.clang-format clang-format cpprestsdk (#1005) Dec 21, 2018
.gitignore Enable Android build in CI, update NDK to 17c. (#922) Oct 18, 2018
.gitmodules
CMakeLists.txt Enable testing from root directory (#1064) Mar 19, 2019
CONTRIBUTORS.txt
README.md
ThirdPartyNotices.txt Update ThirdPartyNotices.txt to only cover websocketpp, since boost a… Oct 18, 2016
azure-pipelines.yml Add --vcpkg-root to repair UWP. Mar 19, 2019
changelog.md Mint v2.10.11. (#1074) Mar 20, 2019
license.txt

README.md

Welcome!

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.

Getting Started

Vcpkg package
Homebrew package
Ubuntu 18.04 package
Fedora Rawhide package
openSUSE Tumbleweed package
Debian Testing package

Build Status

With vcpkg on Windows

PS> vcpkg install cpprestsdk cpprestsdk:x64-windows

With apt-get on Debian/Ubuntu

$ sudo apt-get install libcpprest-dev

With dnf on Fedora

$ sudo dnf install cpprest-devel

With brew on OSX

$ brew install cpprestsdk

With NuGet on Windows for Android

PM> Install-Package cpprestsdk.android

For other platforms, install options, how to build from source, and more, take a look at our Documentation.

Once you have the library, look at our tutorial to use the http_client. It walks through how to setup a project to use the C++ Rest SDK and make a basic Http request.

To use from CMake:

cmake_minimum_required(VERSION 3.7)
project(main)

find_package(cpprestsdk REQUIRED)

add_executable(main main.cpp)
target_link_libraries(main PRIVATE cpprestsdk::cpprest)

What's in the 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 (UWP), Linux, OS X, Unix, iOS, and Android
  • Support for Visual Studio 2015 and 2017 with debugger visualizers

Contribute Back!

Is there a feature missing that you'd like to see, or found a bug that you have a fix for? Or do you have an idea or just interest in helping out in building the library? Let us know and we'd love to work with you. For a good starting point on where we are headed and feature ideas, take a look at our requested features and bugs.

Big or small we'd like to take your contributions back to help improve the C++ Rest SDK for everyone. If interested contact us askcasablanca at Microsoft dot com.

Having Trouble?

We'd love to get your review score, whether good or bad, but even more than that, we want to fix your problem. If you submit your issue as a Review, we won't be able to respond to your problem and ask any follow-up questions that may be necessary. The most efficient way to do that is to open an issue in our issue tracker.

Quick Links

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

You can’t perform that action at this time.