Rust
Rust
Yousign: Download File to Memory
See more Yousign Examples
Downloads a previously uploaded Yousign file (PDF) to memory.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();
// Adds the "Authorization: Bearer YOUR_API_KEY" header.
http.set_auth_token("YOUR_API_KEY");
let download_url = "https://staging-api.yousign.com/files/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/download?alt=media".to_string();
let pdf_data = chilkat::BinData::new();
if http.download_bd(&download_url, &pdf_data).is_err() {
println!("{}", http.last_error_text());
return;
}
// Your application may now access the data contained in "pdfData".
println!("Success");