Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-lippert authored Sep 27, 2023
1 parent b888995 commit 2132d58
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}

0 comments on commit 2132d58

Please sign in to comment.