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
1
vote
1 answer

c++ UTF-8 string erro starting at 10xxxxxx with cpprestsdk

I have been working with the cpprestsdk for quite a bit, and have not been having this issue at all until today. I am not sure what changed, but after debugging it for awhile, I am confused as to why this is happening. When converting a utf-8 string…
mmetalfan
  • 23
  • 1
  • 6
1
vote
0 answers

C++ REST SDK server implementation URI giving errors

I am trying to write my own implementation of REST server using C++ REST SDK. the class used is http_listener. Almost all of it compiles properly but when i try to buld a URI using class web::http::URI it gives me error, also if pass the URI to…
sabby
  • 21
  • 5
1
vote
1 answer

how can i generate an individual access token for users?

I am currently working on a REST API for my Web Service. Every user who is registered, must have an individual access token for the API, but how can I generate one, without checking every token if it is the same as the new token? [Not…
Panakotta00
  • 135
  • 9
1
vote
0 answers

How to listen on an IPv6 address using cpprestsdk http_listener?

I passed an url http://2001:420:589a:2009::101/, which included an IPv6 address of my test server, to the constructor of http_listener and then called http_listener.open().wait(), unfortunately I got an exception saying resolve: Service not…
1
vote
0 answers

Sending a audio buffer using C++ Rest SDK

I recently started to use C++ Rest SDK and I'm trying to send an audio buffer to Watson Speech to Text service and the docs didn't make clear to me how to use or upload a buffer using this lib, I started using a Microsfot sample to upload…
jaojpaulo
  • 21
  • 4
1
vote
1 answer

Must NuGet configure project's include paths?

I have downloaded Dropbox CPP REST sample from official MS site. In order to use cpprestsdk I asked NuGet to download package. It has downloaded packages for various tool sets: When I build project I got error: Severity Code Description…
vico
  • 17,051
  • 45
  • 159
  • 315
1
vote
1 answer

No CPP REST SDK in NuGet

I have never used nuget before in Visual C++ project. But now I got help on How to use the C Rest SDK NuGet package there. I have started c++ console project, clicked on "Manage NuGetPackages for solution...": And got list of packages. Looks like…
vico
  • 17,051
  • 45
  • 159
  • 315
1
vote
0 answers

How can I connect to Watson Speech to Text server using C++ Rest SDK Websocket

I'm trying to connect to Watson Speech to Text server uisng websocket but when I try to make the connection don't connect. I get the connection token to autenticate my websocket connection, so concatenate with the URL and try to connect but as I…
jaojpaulo
  • 21
  • 4
1
vote
1 answer

C++ REST SDK (Casablanca) - How to get HTTP Proxy settings

I am using the Casablanca C++ REST SDK to perform a web request, however I would like the code to be smart enough to detect any system proxy settings. In C#, I believe this is as easy as: WebRequest.DefaultProxy =…
Simple Guy
  • 568
  • 5
  • 21
1
vote
1 answer

How to give to a client specific ip address in Casablanca (CPP Rest SDK)

I have multiple NIC cards in my machine. One of them is a static IP and the other one isn't. However, they both have access to the Internet. Is there a way to force the CPP Rest SDK (Casablanca) to use the static IP address instead of the…
Aleksandr
  • 96
  • 7
1
vote
1 answer

can I reply html file as response with cpprest?

I'm using cpprest for small http web service When request from client comes, I want to make server reply response as html file. like : //Webserver.cpp ... void HandleGet(http_request request) { uri relativeUri = request.relative_uri(); …
furyhunter
  • 129
  • 13
1
vote
0 answers

C++ - Http PUT file upload not working on server CppRest

I'm trying to upload a picture to my rest API on my server through the following code (using cpprest libraries): int uploadActiveUserImage(std::string *fileName) { auto fileStream = std::make_shared(); // Open stream to output file. …
Robbert D
  • 11
  • 4
1
vote
0 answers

NuGet Package cpprestsdk 2.6.0 in VS2017 get Error LNK2019 unresolved symbols

I've try to make a simple C++ REST Client on a Win7 computer with cpprestsdk and VS2017. So I've used NuGet package Manager to install cpprestsdk in Version 2.6.0, because I must use source code on a linux machine with only a 2.6 version so…
Banzai
  • 189
  • 1
  • 2
  • 10
1
vote
1 answer

CMake errors when building cpprestsdk

I'm trying to build cpprestsdk (https://github.com/Microsoft/cpprestsdk) under MSYS2. With pacman I installed the required dependencies: boost openssl But I get the following output: $ cmake -G "MSYS Makefiles" .. -DCMAKE_BUILD_TYPE=Release --…
Mark
  • 4,338
  • 7
  • 58
  • 120
1
vote
1 answer

JSON serialize std::list and std::map using cpprestsdk

I am using cpprestsdk to write a server application in C++ that uses REST services. In my application, I have to serialize a class that contains std::list and std::map objects to JSON. Is there any example on serialize STL classes using…
Varun V
  • 327
  • 2
  • 10