From 2132d582d5494e059d46fb33cbba30c22d75f5e4 Mon Sep 17 00:00:00 2001 From: sam-lippert Date: Tue, 26 Sep 2023 23:50:01 -0500 Subject: [PATCH] Add logging --- worker.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/worker.js b/worker.js index 5055f88..4e8b6f9 100644 --- a/worker.js +++ b/worker.js @@ -93,10 +93,15 @@ export class Alarm { await this.storage.setAlarm(this.due = Date.now() + this.every) await this.state.storage.put('due', this.due) } - return fetch(this.callback, { + const init = { method: this.body ? 'POST': 'GET', body: this.body, headers: this.contentType ? { 'Content-Type': this.contentType } : undefined - }) + } + console.log(this.callback, init) + let res = await fetch(this.callback, init) + const test = await res.text() + console.log(text) + return text } }