How to use Web API's with C++ language?

user5430360 picture user5430360 · Dec 17, 2015 · Viewed 8.5k times · Source

So i've been learning OOP is quite a while now and wanted to test out the little knowledge i have.. I wanted to use some API provided by the website, This API Checks if a username is already been taken. But how will i do it with C++? Where will i start?

This is :

http://www.roblox.com/UserCheck/DoesUsernameExist?username=bob1

The username is taken so:

{
    "success" :true
}

Answer

brainstream picture brainstream · Dec 17, 2015

C++ from a box does not provide a support of HTTP protocol and a JSON parser. You should use third party libraries such as libcurl and libjson.

Here is an example, how to use libcurl to download a JSON data.