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

400 Bad request with casablanca cpprestsdk

http_request request(methods::POST); request.headers().add(L"Content-Type", L"application/json; charset=utf-8"); request.headers().add(L"X-Requested-With", L"XMLHttpRequest"); request.set_body(body); The code above gives the following…
Herve Mutombo
  • 170
  • 1
  • 2
  • 14
1
vote
1 answer

Implementing multiple API in casablanca

I'm looking at this code which implements a simple JSON server using casablanca. I have not found a better example so far. The author seems to use a different HTTP method for each API which could become a problem when the server is supposed to many…
nevanom
  • 370
  • 1
  • 3
  • 14
1
vote
2 answers

c++ error saving to file using stream

I'm doing some code where i redirect the output to a file, but i get error using the fstream, ostream, streambuf(). It says that -"fstream" is ambiguous -"ostream" is ambiguous -class "std::basic_ostream>" has no member "streambuf" -class…
Tazz
  • 79
  • 13
1
vote
1 answer

c++ Debug Assertion Failed on HTTP Request

I'm doing some code where i need to do a GET request and manipulate the info received. For this i'm using C++ REST SDK (codename "Casablanca") for the request This is my code #include #include using…
Tazz
  • 79
  • 13
1
vote
0 answers

Using REST in MSVC 2008 C++

I am writing app for windows mobile 5.0 and I have to use REST to get the data from the server. Initially the idea was to use Casablanca but it turns out that Casablanca does not really work with VS2008 (at least 2013 is needed, and, as far as I…
1
vote
1 answer

Client progress polling with CPPRestSDK

I have a task which takes a while to execute, and I would like to launch it and broadcast its progress through a Rest request as described here. I've set up a listener with Client progress polling with CPPRestSDK , but I can't figure out a way of…
Victor.dMdB
  • 999
  • 2
  • 11
  • 29
1
vote
1 answer

Cannot listen on specific port num with localhost address with http_listener(C++ REST SDK)

I use C++ REST SDK to build up a HTTP server which is used for receiving requests from postman, but if I code like this: http_listener listener(L"http://localhost/io"); listener.open().wait(); listener.support(methods::POST, [](http_request req) { …
firstaccount
  • 155
  • 2
  • 13
1
vote
0 answers

http_client Get request method not working in cpprest of CASABLANCA SDK

I am trying to build a sample provided in Microsoft Casablanca in my Ubuntu environment. I am following the link: https://msdn.microsoft.com/en-us/library/jj950082.aspx My code followed from above link: #include #include…
Satish
  • 1,315
  • 4
  • 15
  • 22
1
vote
0 answers

extract ssl cert from casablanca http_request

Is there way to extract ssl context from http_request of casablanca ? I am looking for an api in casablanca http_request to get certificate object
Abhay
  • 564
  • 6
  • 14
1
vote
1 answer

C++ REST (Casablanca) - Failure while reading JSON

I was trying my hands with C++ REST APIs I wrote to json using below way. json::value resp; std::vector portfolio; // Populate portfolio this->PortfolioList(usrStr, pwdStr, portfolio); std::vector::iterator it; for (it =…
SimpleGuy
  • 2,764
  • 5
  • 28
  • 45
1
vote
1 answer

C++ REST (Casablanca) - web::json::value has no member named 'field_map'

I am new to C++ REST ('Casablanca'). I read the tutorial here. After than, I took a sample code from there and tried to run it on my machine. Below is the code std::map dictionary; void handle_get(http_request…
SimpleGuy
  • 2,764
  • 5
  • 28
  • 45
1
vote
1 answer

Visual Studio 2015: C++ REST API (Casablanca) failing compilation in VS includes/headers

I installed Visual Studio 2015 Professional edition today and created a C++ Win32 console application Then I want to use C++ REST SDK (Casablanca), so I downloaded it v14 using NuGet package manager And created a sample program using this…
SimpleGuy
  • 2,764
  • 5
  • 28
  • 45
1
vote
2 answers

Howto reconnect to a server which does not answer to close()

I am using the C++ REST SDK ("Casablanca") to receive feed from websocket servers. Sometimes, I need to close the connection and reconnect. The library does not have a reconnect function, so I close the old connection and simply open a new one. The…
Bobface
  • 2,782
  • 4
  • 24
  • 61
1
vote
0 answers

cpprestsdk cookie handling

I'm using the cpprestsdk in a native Windows desktop client app (written in WTL), so it uses WinHttp. Now, WinHttp has automatic cookie handling, but in the cpprestsdk when I get a response that has Set-Cookie headers, the cookies don't get set on…
domehead100
  • 161
  • 1
  • 7