Integrate brrr with JavaScript

JavaScript can send a brrr notification with fetch.

The following example sends a JSON payload with a title and message. The response status and body are printed so you can confirm the request succeeded.

JavaScript
const url = "https://api.brrr.now/v1/🙈🙈🙈🙈🙈🙈🙈🙈🙈🙈"
 
const res = await fetch(url, {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    title: "Test from JavaScript",
    message: "Hello world! 🚀"
  })
})
 
console.log(res.status)
console.log(await res.text())

Continue to Docs for the full webhook format if you want to add more fields.