Sample code for 30+ languages & platforms
Unicode C++

Bluzone Get List of Beacons

See more Bluzone Examples

Get beacons for a project.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkHttpW.h>
#include <CkStringBuilderW.h>

void ChilkatSample(void)
    {
    bool success = false;

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    CkHttpW http;

    // Implements the following CURL command:

    // curl -X GET \
    //   https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/devices/beacons \
    //   -H 'bzid: YOUR_API_KEY_HERE'

    http.SetRequestHeader(L"bzid",L"YOUR_API_KEY_HERE");

    CkStringBuilderW sbResponseBody;
    success = http.QuickGetSb(L"https://bluzone.io/portal/papis/v1/projects/YOUR_PROJECT_ID_HERE/devices/beacons",sbResponseBody);
    if (success == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    wprintf(L"Response body:\n");
    wprintf(L"%s\n",sbResponseBody.getAsString());
    }