cpprestsdk/2.10.19

A project for cloud-based client-server communication in native code using a modern asynchronous C++ API design
Recipe info
2023-12-05

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
cpprestsdk/2.10.19

Using cpprestsdk

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
cpprestsdk/2.10.19
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("cpprestsdk/2.10.19")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): cpprestsdk
  • CMake target name(s): cpprestsdk::cpprestsdk
  • cpprest => cpprestsdk::cpprest
    cpprestsdk_zlib_internal => cpprestsdk::cpprestsdk_zlib_internal
    cpprestsdk_boost_internal => cpprestsdk::cpprestsdk_boost_internal
    cpprestsdk_openssl_internal => cpprestsdk::cpprestsdk_openssl_internal
    cpprestsdk_websocketpp_internal => cpprestsdk::cpprestsdk_websocketpp_internal
    
  • pkg-config file name(s): cpprestsdk.pc
  • cpprest => cpprestsdk-cpprest.pc
    cpprestsdk_zlib_internal => cpprestsdk-cpprestsdk_zlib_internal.pc
    cpprestsdk_boost_internal => cpprestsdk-cpprestsdk_boost_internal.pc
    cpprestsdk_openssl_internal => cpprestsdk-cpprestsdk_openssl_internal.pc
    cpprestsdk_websocketpp_internal => cpprestsdk-cpprestsdk_websocketpp_internal.pc
    

A simple use case using the CMake file name and the global target:

# ...
find_package(cpprestsdk REQUIRED)
# ...
target_link_libraries(YOUR_TARGET cpprestsdk::cpprestsdk)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the cpprestsdk homepage listed above:

#include "cpprest/astreambuf.h"
#include "cpprest/asyncrt_utils.h"
#include "cpprest/base_uri.h"
#include "cpprest/containerstream.h"
#include "cpprest/details/SafeInt3.hpp"
#include "cpprest/details/basic_types.h"
#include "cpprest/details/cpprest_compat.h"
#include "cpprest/details/fileio.h"
#include "cpprest/details/http_constants.dat"
#include "cpprest/details/http_helpers.h"
#include "cpprest/details/http_server.h"
#include "cpprest/details/http_server_api.h"
#include "cpprest/details/nosal.h"
#include "cpprest/details/resource.h"
#include "cpprest/details/web_utilities.h"
#include "cpprest/filestream.h"
#include "cpprest/http_client.h"
#include "cpprest/http_compression.h"
#include "cpprest/http_headers.h"
#include "cpprest/http_listener.h"
#include "cpprest/http_msg.h"
#include "cpprest/interopstream.h"
#include "cpprest/json.h"
#include "cpprest/oauth1.h"
#include "cpprest/oauth2.h"
#include "cpprest/producerconsumerstream.h"
#include "cpprest/rawptrstream.h"
#include "cpprest/streams.h"
#include "cpprest/uri.h"
#include "cpprest/uri_builder.h"
#include "cpprest/version.h"
#include "cpprest/ws_client.h"
#include "cpprest/ws_msg.h"
#include "pplx/pplx.h"
#include "pplx/pplxcancellation_token.h"
#include "pplx/pplxconv.h"
#include "pplx/pplxinterface.h"
#include "pplx/pplxlinux.h"
#include "pplx/pplxtasks.h"
#include "pplx/pplxwin.h"
#include "pplx/threadpool.h"