Skip to content

Instantly share code, notes, and snippets.

@aloukissas
Created January 23, 2019 07:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aloukissas/3be0a50d708cf25ec4feb7b537774c67 to your computer and use it in GitHub Desktop.
Save aloukissas/3be0a50d708cf25ec4feb7b537774c67 to your computer and use it in GitHub Desktop.
const EXPO_HOST = "https://exp.host/--/api/v2/push/send";
function sendNotification(token, title, body) {
return fetch(EXPO_HOST, {
body: JSON.stringify({
to: token,
title: title,
body: body
}),
headers: {
"Content-Type": "application/json",
},
method: "POST",
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment