Using in a C++/CLI project
ozgur-d opened this issue · 2 comments
Hello,
I wanted to use this in my C++/CLI project. I imported CloudFlareUtilities as a dll into my project, but it doesn't give response.
client.GetStringAsync(target).Result;
It's stuck at this line. How can I use it in my project? Thank you.
I believe C++ has the async/await pattern now (according to here). So, to get the result, you'd need to do something like auto x = await client.GetStringAsync(target);
.
I don't have any prior experience with async
in C++, but you could check out an MSDN page on the topic. Note that if you want to make use of the async / await pattern, you'll probably need to compile with Visual Studio as opposed to GCC or an alternative.
Sorry, I have almost no experience with C++ in general and absolutely no experience with C++/CLI. Stack Overflow or a similar site is probably a better place to get your question answered.