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
0
votes
1 answer

No object generated while building MS Casablanca library for c++

Trying to build Microsoft REST SDK. Got errorious output: 1>d:\lb\cpprestsdk\release\include\cpprest\json.h(1386): error C2220: warning treated as error - no 'object' file generated 1>d:\lb\cpprestsdk\release\include\cpprest\json.h(1386): warning…
vico
  • 17,051
  • 45
  • 159
  • 315
0
votes
1 answer

Using co_await to improve readability of my PPL code

I'm worked on a CLIENT SERVER application with cpprestsdk and it works fine. Now i want to improve readability of my code (lots of .then() method) using co-routines. Using co_await the compiler,(on VC++2015 or VC++2017) will refactor the code in a…
kenhero
  • 95
  • 2
  • 11
0
votes
1 answer

http_listener casablanca doesn't bind from a public method

As title i have a client server application that works but now i try to redesign my software to be more elegant. So i created a Server class to create an http_listener and handle POST and GET method but after that it doesn't work anymore.In .h i…
kenhero
  • 95
  • 2
  • 11
0
votes
3 answers

Unable to build cpprestsdk

When I try to build cpprestsdk (https://github.com/Microsoft/cpprestsdk) in MSYS2 I get a very long list of errors. Here my enviroment: Windows 10 MSYS2 with i686-w64-mingw32 toolchain gcc 6.3.0 make 4.2.1 cmake 3.8.0 CMake $ cmake -G "MSYS…
Mark
  • 4,338
  • 7
  • 58
  • 120
0
votes
0 answers

Using cpprest to read binary data

I'm using Microsoft's cpprest sdk to read binary data over the internet. My variable stream below is of type concurrency::streams::istream. I'm trying to read a million rows of type struct row and process them. I see that I don't get all the bytes I…
Greg Clinton
  • 365
  • 1
  • 7
  • 18
0
votes
0 answers

CPP Rest SDK http_listener throws exception in nano server (in a Docker container)

I have a server app built witn Cpp Rest SDK which runs fine in a windowsserver code Docker container (10GB!). Now I'm trying to make it work in a nano server container to save space (1GB "only"). The app runs but then in throws an exception during…
Marco Fiocco
  • 352
  • 2
  • 15
0
votes
1 answer

cpprestsdk handler class crashes when using STL container as member

I wrote a simple code using cpprestsdk. I use a map (records) as a member of CommandHandler class, and manipulate it in a public method (has_record()). it works before handler.open().wait() runs, but when I call it in a request, it crashes! Here is…
JalalJaberi
  • 2,417
  • 8
  • 25
  • 41
0
votes
1 answer

How to get real IP address bypassing hosts file on Windows

I added a host-ip mapping in my C:\Windows\System32\drivers\etc\hosts 192.168.1.105 www.facebook.com I tried both getaddrinfo and DnsQuery, neither works. The DsnQuery code is from this example. The result is: The IP address of the host…
user1633272
  • 2,007
  • 5
  • 25
  • 48
-1
votes
1 answer

cpprestsdk: unable to parse json input

For some reason, the for loop in fromJson method fails to iterate over available JSON fields. The way I understand it (based on the debugging), it is unable to read input string as JSON object. But when I check it in the debugger, I see the correct…
CorellianAle
  • 645
  • 8
  • 16
-2
votes
1 answer

Callbacks to decouple API usage

I'm trying to create a simple static class library to decouple WebSocket usage from the rest of my code. Creating this will allow me to easily switch the WebSocket library (I'm currently using cpprestsdk) without the need to change my code (or its…
-2
votes
1 answer

Cannot execute code after the loop in c++

I'm facing a problem in c++ that I don't understand. this is my code: auto DataArray = jvalue.at(U("data")).as_array(); std::cout << "Outside the loop, first output" << std::endl; for (int i = 0; i <= 10; i++) { auto data = DataArray[i]; …
noyruto88
  • 767
  • 2
  • 18
  • 40
1 2 3
13
14