简体   繁体   中英

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

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
}

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM