cpprest-sdk

Statically linking Casablanca/CPPREST SDK

瘦欲@ 提交于 2019-12-07 02:19:51
问题 I am trying to create a Windows-based VC++ DLL (in VS 2015) that statically links to the Casablanca CPPREST SDK. That is, I would like a single DLL output which contains the CPP REST library along with my code. I have referred to this thread, however it seems rather dated (and has broken links): https://katyscode.wordpress.com/2014/04/01/how-to-statically-link-the-c-rest-sdk-casablanca/ I have tried to download the Casablanca repo from GitHub and compile the "cpprestsdk140.static" project

how to convert utf8 to std::string?

廉价感情. 提交于 2019-12-06 06:28:49
I am working on this code which receives a cpprest sdk response containing a base64_encoded payload which is a json. here is my code snippet: typedef std::wstring string_t; //defined in basic_types.h in cpprest lib void demo() { http_response response; //code to handle respose ... json::value output= response.extract_json(); string_t payload = output.at(L"payload").as_string(); vector<unsigned char> base64_encoded_payload = conversions::from_base64(payload); std::string utf8_payload(base64_encoded_payload.begin(), base64_encoded_payload.end()); //in debugger I see the Japanese chars are

Dealing with kanji characters in C++

烂漫一生 提交于 2019-12-06 06:27:17
I have a windows deskop application (named: Timestamp) written in C++ that use .NET called CLR. I also have DLL project (named: Amscpprest) written in native c++ and uses CPPREST SDK to get json data from server and pass the data to my Timestamp app. Here's the scenario: This is the return json data from my server, its a list of staff name and most of it is japanese names written in Kanji characters. [ { "staff": { "id": 121, "name": "福士 達哉", "department": [ { "_id": 3, "name": "事業推進本部" } ] } }, { "staff": { "id": 12, "name": "北島 美奈", "department": [ { "_id": 4, "name": "事業開発本部" } ] } }, {

Statically linking Casablanca/CPPREST SDK

廉价感情. 提交于 2019-12-05 05:44:22
I am trying to create a Windows-based VC++ DLL (in VS 2015) that statically links to the Casablanca CPPREST SDK. That is, I would like a single DLL output which contains the CPP REST library along with my code. I have referred to this thread, however it seems rather dated (and has broken links): https://katyscode.wordpress.com/2014/04/01/how-to-statically-link-the-c-rest-sdk-casablanca/ I have tried to download the Casablanca repo from GitHub and compile the "cpprestsdk140.static" project which produces a lib file. The problem is I get a number of unresolved externals when linking it with my