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

200 questions
8
votes
3 answers

Statically linking Casablanca/CPPREST SDK

I am trying to create a Windows-based VC++ DLL (in VS 2015) that statically links to the Casablanca CPPREST SDK. That is, I would like a single DLL output which contains the CPP REST library along with my code. I have referred to this thread,…
Simple Guy
  • 541
  • 5
  • 18
7
votes
1 answer

How do I use swagger-codegen cpprest client library code?

I've recently used swagger-codegen to generate the cpprest client code for my swagger spec. The code all compiles and links swell in my C++ app. But, how do I actually use it from my C++ application? I've seem to have initialized the ApiClient and…
Jay Koutavas
  • 812
  • 1
  • 11
  • 25
7
votes
2 answers

CPPRestSDK (casablanca) Extract JSON From Incoming WebSocket Messages (malformed token)

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…
KKlouzal
  • 642
  • 5
  • 25
6
votes
2 answers

Function that returns map in c++

Can someone please give an actual example of function that returns map in c++. I tried answers from other posts but I don't know how to apply in my case. This is my working code: auto DataArray = jvalue.at(U("data")).as_array(); //Make an…
noyruto88
  • 493
  • 1
  • 8
  • 28
4
votes
2 answers

CppRestSDK How to POST multipart data

I'm trying to POST Multipart data to a server, I'm switching to CPPRestSDK from CPR, but I can't seem to find any documentation on it Coming from CPR, https://github.com/whoshuu/cpr Meaning I've tried that code, but I just can't seem to find any…
JohnkaS
  • 535
  • 3
  • 16
4
votes
0 answers

C++ using CPPRestSDK ("Casablanca") to authenticate to azure IoT Hub

EDIT: I managed to get a c# version working (below) Original Question: I'm trying to connect to Azure's IoT Hub through the cpprestsdk and POST a json-structured obj to it. However, i cant find anything regarding authentication anywhere. I've…
Joel
  • 3,791
  • 1
  • 25
  • 41
4
votes
0 answers

How to add cpp rest sdk (cassablanca) to a project in VSCode on Mac

I am trying to install and add cpprestsdk to my c++ project and I cannot seem to figure out how to do so. I have followed the instructions here: https://github.com/Microsoft/cpprestsdk/wiki/How-to-build-for-Mac-OS-X that have me build and run test…
Biggytiny
  • 479
  • 7
  • 25
4
votes
1 answer

Get IP of HTTP request in Casablanca

I have a small server that listens to http requests using Casablanca / cpprestsdk. I've seen that other APIs provide this feature of retrieving client's IP, but after foraging the Internet and the sdk, well.. here I am. Any help plz?
kundrata
  • 615
  • 3
  • 12
  • 24
3
votes
1 answer

dll library with cpprestsdk compilation on windows xp

I have dll project using cpprestsdk in visual studio 2019 (along with console application for testing purposes). On windows 7 and windows 10 original package works as expected, however I'm having hard time to compile and run on windows…
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
  • 2,628
  • 5
  • 32
  • 63
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
  • 31
  • 1
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,100
  • 19
  • 71
  • 141
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
  • 493
  • 1
  • 8
  • 28
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
  • 282
  • 2
  • 15
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,026
  • 1
  • 24
  • 57
1
2 3
13 14