Skip to content

Instantly share code, notes, and snippets.

@reeceatkinson
Created September 5, 2022 19:47
Show Gist options
  • Save reeceatkinson/f667bcc44173bade9c3421cb04ff954a to your computer and use it in GitHub Desktop.
Save reeceatkinson/f667bcc44173bade9c3421cb04ff954a to your computer and use it in GitHub Desktop.
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer API_KEY_HERE',
"Content-Type": 'application/json'
},
body: JSON.stringify({
"project": "upmeet",
"title": "Website Analytics",
"value": "Analytic Total",
"icon": "📊",
})
};
fetch('https://api.logsnag.com/v1/log', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment