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
2 answers

What is the format specifier of error_code?

I'm trying to use Microsoft's cpprestsdk. And I was getting an error, and so I wanted to check the error code. But I'm not able to figure out the format specifier of error_code, and I'm getting this warning : warning: format ‘%d’ expects argument…
Nikhil Wagh
  • 1,376
  • 1
  • 24
  • 44
0
votes
1 answer

c++ wstring special characters

I'm using cpprestsdk to work with JSON. During creation of JSON I have a problem with special characters like Å. For example: json::value json; std:string s = "ÅÅÅ"; std::wstring wstvalue(s.begin(), s.end()); json[L"key"] =…
Danny
  • 682
  • 1
  • 11
  • 21
0
votes
2 answers

cpprestsdk Segmentation Fault in http_request::set_body on Linux

I try to send a HTTP (REST) request to a server with cpprestsdk. void postRestRequest(const std::string& uri, const std::string& requestJson) { const std::string host = "localhost:8080"; const http_client_config authorization =…
woodtluk
  • 935
  • 8
  • 20
0
votes
1 answer

Access Azure storage service using cpprest SDK

I am trying to list blobs in my Azure storage account using cpprest sdk and this is my code: pplx::task HTTPRequestCustomHeadersAsync() { http_client client(L"https://.blob.core.windows.net/?comp=list"); // Manually…
0
votes
0 answers

Error C3083 '`global namespace'': the symbol to the left of a '::' must be a type cpprestsdk

I'm using cpprestsdk for a Http client in my code as given below: std::string MyClass::GetPage(std::string url) { web::http::client::http_client httpClient(utility::conversions::to_string_t(url)); pplx::task request…
kovac
  • 4,945
  • 9
  • 47
  • 90
0
votes
1 answer

macOS failure to compile cpprestsdk

I am getting the following error when I try to compile cpprestsdk: /Users/radu/work/casablanca/Release/libs/websocketpp/websocketpp/transport/asio/connection.hpp:425:24: error: no matching function for call to 'make_shared' m_strand =…
codentary
  • 993
  • 1
  • 14
  • 33
0
votes
1 answer

Correct way to parse JSON values vie cpprestsdk

Trying to figure out a general to-go way for JSON value parsing. No error checking: myField = jsonValue["myField"].as_string();` With error checking: if (jsonValue.is_null()) return false; if (!jsonValue.is_object()) return false; for…
CorellianAle
  • 645
  • 8
  • 16
0
votes
1 answer

cpprest asserts when I try to read append blob

Cpprest asserts when I try to read an azure storage append blob that another process is appending to. Below is the relevant snippet of my code. The assert occurs during .get() after some number of iterations of the while loop and way before reaching…
Greg Clinton
  • 365
  • 1
  • 7
  • 18
0
votes
1 answer

Visual studio 2017 cpprestsdk for linux

I`m trying to build a linux console app for web post(REST) with VS2017. Can i compile cpprestsdk for linux with VS2017?
손호성
  • 1
  • 4
0
votes
1 answer

Compile error when trying to compile boost and openssl (When using Websocket++ or CPPRestSDK)

I am currently trying to get a working tls websocket client running in C++ (which is a pain in the ass) and I have tried CPP Rest SDK as well as Websocket++. Both spit out a bunch of compile errors (see below). When I tried compiling it using…
StuntHacks
  • 457
  • 3
  • 15
0
votes
1 answer

Is it safe to auth user against https server?

Our application is using client/server architecture, it's running on windows. Our users need to login the client with user/password via http(or https in future), and then obtain their permissions. Previously we use http protocol, so the contract…
user1633272
  • 2,007
  • 5
  • 25
  • 48
0
votes
1 answer

CPPREST SDK on CLion using CMake on Mac

I am attempting to use the CPPREST SDK in CLion on a Mac using CMake. I'm almost there, but I cannot seem to resolve the following linker error: Undefined symbols for architecture x86_64: "_ERR_remove_thread_state", referenced from: …
N Smith
  • 179
  • 1
  • 5
0
votes
1 answer

about C++ rest sdk and synchronous calls

I have started working with 'cpp rest sdk'. The key point I understood it that all requests and response are asynchronous using the means of PPL. This is fine to boost scalability and performance of the application. The question I have is weather is…
Abruzzo Forte e Gentile
  • 14,423
  • 28
  • 99
  • 173
0
votes
0 answers

Send parameters by using GET method in REST server

I have simple REST server GET method: public class PersonController : ApiController { // GET: api/Person public IEnumerable Get() { return new string[] { "value1", "value2" }; } ... } It…
vico
  • 17,051
  • 45
  • 159
  • 315
0
votes
1 answer

Running Casablanca program fails with 'openssl/conf.h' file not found on Mac OS

I am trying to setup a Http client and download some data using the example shown here. When I try to run the program, it fails saying "conf.h" is not found. $g++ -std=c++11 BingSearch.cpp In file included from BingSearch.cpp:1: In file included…
Anit
  • 345
  • 1
  • 5
  • 19
1 2 3
13
14