Questions tagged [cpprest-sdk]

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design.

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design.

https://github.com/Microsoft/cpprestsdk

206 questions
3
votes
0 answers

how to convert Concurrency::streams::istream to std::istream in c++

I was coding with CppRESTsdk and got Concurrency::streams::istream from the response body like the following code: web::http::http_response localVarResponse; auto concurrencyStream = localVarResponse.body(); I want to convert the stream to…
user5005768Himadree
  • 1,375
  • 3
  • 23
  • 61
3
votes
2 answers

Using Windows Authentication with cpprestsdk?

Using WinHTTP right now, and looking to switch over to cpprestsdk. I'm looking through the documentation, and I don't see anything about support for NTLM/Negotiate/Kerberos support. Am I missing something? I find it hard to believe that MS wouldn't…
bpeikes
  • 3,495
  • 9
  • 42
  • 80
3
votes
0 answers

tolower conflict while using python2.7 and c++rest

While using the libraries of c++rest and python together in my c++ code, I get an error of function "tolower" to be undefined. I get to understand because in python pyport.h there is a #undef tolower #define tolower(c) towlower(btowc(c)) But at…
pavan kota
  • 41
  • 2
3
votes
0 answers

How to integrate cpprestsdk with Apache web server?

Is there a way to integrate cpprestsdk (https://github.com/Microsoft/cpprestsdk) with Apache web server? We have our web server configured with Apache 2.2 with C++ modules. Now, I want to provide REST API and want to utilize existing Apache Web…
shrek
  • 31
  • 2
3
votes
1 answer

Cannot build a cmake project in Visual Studio and vcpkg (fatal error C1083)

I installed vcpkg today, enabled integration with Visual Studio, ie .\vcpkg integrate install, and started installing libraries. I basically installed cpprestsdk and that trigger installation of boost libraries. Then I opened the project in the…
cateof
  • 6,608
  • 25
  • 79
  • 153
3
votes
2 answers

Entry point could not be located in the dynamic link library - c++

I created a DLL project in visual c++, and I wanted to use the cpprestsdk/casablanca. Then I created a RestWrapper.h header file: #pragma once namespace mycpprest { class RestWrapper { public: static __declspec(dllexport) void…
noyruto88
  • 767
  • 2
  • 18
  • 40
3
votes
1 answer

how to use static build of cpprest-sdk generated by vcpkg?

I want to use cpprestsdk as static library for my project, I used the vcpkg tool to get the static library by entering the command: vcpkg install cpprestsdk:x86-windows-static, I have the following lib files under my installed directory in vcpkg…
Rathma
  • 1,196
  • 2
  • 33
  • 65
3
votes
1 answer

How to parse json data from websocket_client using cpprestsdk

I'm connecting to a WebSocket whom always replies in JSON. I see there is an extract_string method for websocket_incoming_message however after trying numerous things with json:value it seems as though you can only construct JSON arrays on-the-fly…
Prince
  • 277
  • 2
  • 16
3
votes
2 answers

What is the best way to use vcpkg to share your project with a friend

I have a project which depends on cpprestsdk, tinyxml2. I run this project on another computer which has no internet connection, I installed these libraries with vcpkg, I was wondering should I statically link these libraries to my solution or use…
Rathma
  • 1,196
  • 2
  • 33
  • 65
3
votes
2 answers

CPP REST SDK JSON - How to create JSON w/ Array and write to file

I'm having troubles with the JSON classes of the CPP REST SDK. I can't figure out when to use json::value, json::object and json::array. Especially the latter two seem very alike. Also the usage of json::array is rather unintuitive to me. Finally I…
DenverCoder21
  • 879
  • 3
  • 16
  • 34
3
votes
1 answer

Certificate pinning using cpprestsdk & boost

I'm trying to implement certificate pinning over [cpprestsdk][1], so far without success. I have seen in inside http_client_config object we can call method set_ssl_context_callback and inside that method, link it to custom certificate validation…
IdoT
  • 2,831
  • 1
  • 24
  • 35
3
votes
1 answer

http_listener cpprestsdk how to handle multiple POST requests

I have developed a client server application with casablanca cpprestskd. Every 5 minutes a client send informations from his task manager (processes,cpu usage etc) to server via POST method. The project should be able to manage about 100…
3
votes
1 answer

Cancelling an upload task

I've done some reading regarding the Azure SDK and in order to cancel a task you seemingly need to pass in a cancellation_token. My upload code is very simple: azure::storage::cloud_block_blob blockBlob =…
Dave F
  • 973
  • 9
  • 19
3
votes
0 answers

cpprest linker error: undefined reference to 'web::http::client::http_client::~http_client()'

I followed the build instruction here: https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-Linux #include #include using namespace utility; // Common utilities like string…
dendrobium
  • 81
  • 2
  • 9
3
votes
1 answer

Send image from OpenCV 3 to Cognitive Face API using C++ REST SDK

I want to use the Microsoft Face API from an application in C++. The cpprest sdk allows me to send an url of image or binary data of image. The problem is that my image is not a file in disk but a cv::Mat in memory. I have been trying to serialize…
1
2
3
13 14