Chilkat  HOME  Android™  Classic ASP  C  C++  C#  Mono C#  .NET Core C#  C# UWP/WinRT  DataFlex  Delphi ActiveX  Delphi DLL  Visual FoxPro  Java  Lianja  MFC  Objective-C  Perl  PHP ActiveX  PHP Extension  PowerBuilder  PowerShell  PureBasic  CkPython  Chilkat2-Python  Ruby  SQL Server  Swift 2  Swift 3,4,5...  Tcl  Unicode C  Unicode C++  Visual Basic 6.0  VB.NET  VB.NET UWP/WinRT  VBScript  Xojo Plugin  Node.js  Excel  Go
| (MFC) Download Full Intake Form in JSON FormatSee more IntakeQ ExamplesThe full intake form is very similar to intake summary object, except it adds an array of questions. For more information, see https://support.intakeq.com/article/31-intakeq-api#download-intake 
 #include <CkHttp.h> #include <CkStringBuilder.h> #include <CkJsonObject.h> void ChilkatSample(void) { CkString strOut; // This example assumes the Chilkat API to have been previously unlocked. // See Global Unlock Sample for sample code. CkHttp http; // To log the exact HTTP request/response to a session log file: http.put_SessionLogFilename("/someDir/sessionLog.txt"); http.SetRequestHeader("X-Auth-Key","xxxxxxxxxxxxxxxxxxxxxxxxx"); CkStringBuilder sbJson; bool success = http.QuickGetSb("https://intakeq.com/api/v1/intakes/[intake-id]",sbJson); if (success == false) { strOut.append(http.lastErrorText()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } if (http.get_LastStatus() != 200) { strOut.append("status code: "); strOut.appendInt(http.get_LastStatus()); strOut.append("\r\n"); strOut.append("response: "); strOut.append(sbJson.getAsString()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); return; } strOut.append("raw response: "); strOut.append("\r\n"); strOut.append(sbJson.getAsString()); strOut.append("\r\n"); CkJsonObject json; json.LoadSb(sbJson); json.put_EmitCompact(true); strOut.append(json.emit()); strOut.append("\r\n"); SetDlgItemText(IDC_EDIT1,strOut.getUnicode()); } | ||||
© 2000-2022 Chilkat Software, Inc. All Rights Reserved.