```rs let json = serde_json::to_string(&metrics)?; console_log!("Metrics: {}

            let json = serde_json::to_string(&metrics)?;
            console_log!("Metrics: {}", json);
            return Response::from_bytes(json.clone().into_bytes())
                .map(|resp| {
                    let mut headers = Headers::new();
                    headers.append("content-type", "application/javascript");
                    resp.with_headers(headers)
                })
Was this page helpful?