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

Download Full Intake Form in JSON Format

See more IntakeQ Examples

The full intake form is very similar to intake summary object, except it adds an array of questions.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkHttpW.h>
#include <CkStringBuilderW.h>
#include <CkJsonObjectW.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;

    // To log the exact HTTP request/response to a session log file:
    http.put_SessionLogFilename(L"/someDir/sessionLog.txt");

    http.SetRequestHeader(L"X-Auth-Key",L"xxxxxxxxxxxxxxxxxxxxxxxxx");

    CkStringBuilderW sbJson;
    success = http.QuickGetSb(L"https://intakeq.com/api/v1/intakes/[intake-id]",sbJson);
    if (success == false) {
        wprintf(L"%s\n",http.lastErrorText());
        return;
    }

    if (http.get_LastStatus() != 200) {
        wprintf(L"status code: %d\n",http.get_LastStatus());
        wprintf(L"response: %s\n",sbJson.getAsString());
        return;
    }

    wprintf(L"raw response: \n");
    wprintf(L"%s\n",sbJson.getAsString());

    CkJsonObjectW json;

    json.LoadSb(sbJson);
    json.put_EmitCompact(true);

    wprintf(L"%s\n",json.emit());
    }