From 0d1206fed262fdc67145676779a2659b95384498 Mon Sep 17 00:00:00 2001 From: Valentin Brandl Date: Sun, 28 Jul 2019 17:40:08 +0200 Subject: [PATCH] Debug output --- backend/src/cdn.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/cdn.rs b/backend/src/cdn.rs index 7011f03..1bf3253 100644 --- a/backend/src/cdn.rs +++ b/backend/src/cdn.rs @@ -17,6 +17,9 @@ impl Cloudflare { client: &Client, file: &str, ) -> impl Future { + let payload = CfPurgeRequest::singleton::(file); + println!("{:#?}", payload); + eprintln!("{:#?}", payload); client .post(format!( "https://api.cloudflare.com/client/v4/zones/{}/purge_cache", @@ -26,7 +29,7 @@ impl Cloudflare { .header("X-Auth-Email", Self::auth_email()) .header("X-Auth-Key", Self::auth_key()) .content_type("application/json") - .send_json(&CfPurgeRequest::singleton::(file)) + .send_json(&payload) .from_err() .and_then(|response| HttpResponse::build(response.status()).streaming(response)) } @@ -63,7 +66,7 @@ impl Cloudflare { } } -#[derive(Serialize)] +#[derive(Serialize, Debug)] struct CfPurgeRequest { files: Vec, }