Rust
Rust
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 Rust Downloads
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
let http = chilkat::Http::new();
// To log the exact HTTP request/response to a session log file:
http.set_session_log_filename("/someDir/sessionLog.txt");
http.set_request_header("X-Auth-Key", "xxxxxxxxxxxxxxxxxxxxxxxxx");
let sb_json = chilkat::StringBuilder::new();
if http.quick_get_sb("https://intakeq.com/api/v1/intakes/[intake-id]", &sb_json).is_err() {
println!("{}", http.last_error_text());
return;
}
if http.last_status() != 200 {
println!("status code: {}", http.last_status());
println!("response: {}", sb_json.get_as_string().unwrap_or_default());
return;
}
println!("raw response: ");
println!("{}", sb_json.get_as_string().unwrap_or_default());
let json = chilkat::JsonObject::new();
let _ = json.load_sb(&sb_json);
json.set_emit_compact(true);
println!("{}", json.emit().unwrap_or_default());