Skip to content

Commit

Permalink
Update uptime.md (#1390)
Browse files Browse the repository at this point in the history
Added ('Content-Type': 'application/json') on headers and changed the
body for ({ content: text }) due to internal server errors in uptime
tutorial for typescript.

Co-authored-by: Marcus Kohlberg <[email protected]>
  • Loading branch information
StefanoP21 and marcuskohlberg authored Sep 26, 2024
1 parent f0ea765 commit 5e06fdc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/tutorials/uptime.md
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,10 @@ export const notify = api<NotifyParams>({}, async ({ text }) => {

const resp = await fetch(url, {
method: "POST",
body: JSON.stringify({ text }),
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ content: text }),
});
if (resp.status >= 400) {
const body = await resp.text();
Expand Down

0 comments on commit 5e06fdc

Please sign in to comment.