Questions tagged [casablanca]

Casablanca is a Microsoft incubation effort to support cloud-based client-server communication in native code using a modern asynchronous C++ API design.

Casablanca is a Microsoft incubation effort to support cloud-based client-server communication in native code using a modern asynchronous C++ API design. It is a project that starts exploring how to best support C++ developers who want to take advantage of the radical shift in software architecture that cloud computing represents.

190 questions
0
votes
1 answer

Not able to get values from JSON in Casablanca, C++

I'm using Casablanca, cpprestsdk to consume REST APIs in C++, in Visual Studio 2015 Professional. I'm trying to develop a simple example here hitting an API and parsing the response as JSON. The URL I'm using, actually returns all the parameters…
Gurdeep
  • 171
  • 9
0
votes
2 answers

How to compare the value in JSON based on the key C++

web::json::value obj; obj[JSONKeyRequest] = web::json::value::string(JSONValueRequest); I create a JSON value, and insert some key and values to it. Then I get this obj in another function, trying to check that whether obj[JSONKeyRequest] equals…
firstaccount
  • 155
  • 2
  • 13
0
votes
1 answer

Adding references of Casablanca Libraries

I am unable to find the references of Casablanca libraries from my Visual Studio and from some online source, I need the references of these two libraries, http_client.h and filestream.h I am using Visual Studio 2013, can someone please tell me from…
0
votes
2 answers

C++ Rest SDK Casablanca Sigtrap

I am using the C++ Rest SDK ("Casablanca") to receive feed from Websocket-Servers. Currently, I have three different connections to three different servers running at the same time using the websocket_callback_client class. The program runs for an…
Bobface
  • 2,782
  • 4
  • 24
  • 61
0
votes
1 answer

Casablanca REST SDK C++ Listener

I have recently used Java Spring to create REST services. In it, there were annotations for binding each specific function to a different REST query. Lets not go too technical here, as a psuedo, it was like this: /** list records */ @bind("/list",…
0
votes
1 answer

about when_any Function (C++ REST SDK)

here https://msdn.microsoft.com/en-us/library/jj969480.aspx the code is like this template auto when_any(_Iterator _Begin, _Iterator _End, const task_options& _TaskOptions = task_options()) -> decltype…
0
votes
2 answers

No suitable method for adding c++ stl string to C++ rest sdk json object utility string_t

I want to add a string into C++ rest sdk json object. I tried json::value obj; obj[L"Login"] = json::value::string(); But the problem is this adds only strings as U("str") and not const std::string. So I can add as obj[L"Login"] =…
0
votes
1 answer

Interacting with github API through casablanca library

I'm building Git client in MFC Framework, and I am using casablanca library in order to make connections with github server and make an usage of its API. In tutorial for Github one example shows how to send a request to github server with user name…
There is nothing we can do
  • 23,727
  • 30
  • 106
  • 194
0
votes
3 answers

Convert Json String to C++ Object using Casablanca REST SDK

Good Morning, iam using the casablanca REST SDK. Is there any simple way to convert a json string in an object and back as shown in this example? (http://www.newtonsoft.com/json/help/html/serializingjson.htm) Update I found a little function that…
Cazzador
  • 33
  • 2
  • 9
0
votes
2 answers

How to receive binary data (protobuf) via REST SDK?

I try to send and receive a protobuf object by using Microsoft REST SDK. If you are not familiar with protobuf, imagine that it can be any other raw data. On the client side the vector is empty. I think that I do not create correctly the streams on…
Dark Foo
  • 11
  • 1
  • 3
0
votes
1 answer

How can I perform an API call with Casablanca while having bost POST data and header data?

I am currently looking for a way to send a POST-request via casablanca/C++ Rest SDK. It's for the reddit API, and I am supposed to send 3 pairs of value in my POST data, as well as 2 pairs with my header. I know that I can add values to my header…
Sossenbinder
  • 4,852
  • 5
  • 35
  • 78
0
votes
1 answer

Async wait for request completion in app using cpprestsdk (casablanca) and asio

I use cpprestsdk (ex-Casablanca) and Boost.Asio, and I need to yield (for other tasks) while waiting for request to complete. I use this: void client::make_request(boost::asio::yield_context yield) { http_client client; uri =…
vladon
  • 8,158
  • 2
  • 47
  • 91
0
votes
2 answers

Casablanca C++ Rest - how to disable certificate validation

I am trying to do a POST on a server using the C++ Rest SDK. It works fine if the Server is set in http, however if the server is set to https, then the code fails with this error Error exception:EinHttpSendRequest: 12175: A security error…
S_R
  • 493
  • 1
  • 9
  • 22
0
votes
1 answer

C++REST SDK, parse JSON that contains (0xEF 0xBF 0xBF) character

I have a REST API that returns a string with files metadata. Among those files I have one that has "" (0xEF0xBF0xBF, link) character in name. When I try to parse such a response I get exception that says: e = {_message="* Line 1, Column 13 Syntax…
0
votes
1 answer

C++ Rest SDK Android Visual Studio 2015

I'am developing an Android static library with Visual Studio 2015. I'am using C++ Rest SDK (https://www.nuget.org/packages/cpprestsdk.android/). It works with Visual Studio 2015 RC but not with Visual Studio 2015. The reason is that Visual Studio…
Rino Seminara
  • 145
  • 1
  • 7