Created
September 5, 2022 19:47
-
-
Save reeceatkinson/f667bcc44173bade9c3421cb04ff954a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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