#[get("report")]
async fn execute(
// 何かする
) -> Result<HttpResponse, ApiError> {
let mut zip = zip::ZipWriter::new(std::io::Cursor::new(Vec::new()));
let options = zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Stored);
zip.start_file("hello_world.csv", options)?;
zip.write(b"Hello, World!")?;
zip.flush()?;
let result = zip.finish()?;
Ok(
HttpResponse::Ok()
.header("content-encoding", "application/zip")
.header("Content-Disposition", "attachment;filename=sampleZip.zip")
.body(result.into_inner())
)